PDA

Bekijk de volledige versie : [HowTo] Install Serendipity Weblog/Blog system



newbiefan
10-06-2011, 16:44
Serendipity (http://www.s9y.org/) is a complete blogsystem written in php. It is simple to install and does not require a specific knowledge.

precondition: installation according wengi's howto (http://www.wl500g.info/showthread.php?t=10307) and wtpe's howto (http://www.wl500g.info/showthread.php?t=20306) for lighttp, php and mysql as well as howto for esmtp (email) (http://www.wl500g.info/showthread.php?t=26955) (Credit to Wengi and WTPE for their good job!)
WinSCP, Putty, mc or nano or vi is called editor
A Router with min. 32 MB Ram (=> WL500gP) is strongly recommended, better is 128MB.

Assumption: in this example-installation the super user is root and not admin.

Preamble: Depending on traffic and related articles, serendipity's database can become pretty big. A disadvantage of Wengis howto is the 1 GB /opt partition, hence a large database can cause problems.
But as we are using linux, this is not a real problem. With just a few commands you can store your database elsewhere. See item "move mysql database" how to do so without changing mysql.
Ensure that mysql is running! Issue a "ps xf | grep mysql
You should see several lines with mysql

Installation:
1.) cd to your my.cnf directory: cd /opt/etc/my.cnf
2.) open my.cnf and add the following 2 lines to section [mysqld]:
default-character-set=utf8
default-collation=utf8_general_ci
store the changed my.cnf
3.) now remove the old database with:
rm /opt/var/lib/mysql/mysql/*.*
rmdir /opt/var/lib/mysql/mysql

#MOVE MYSQL DATABASE (if you want to store your database elsewhere)
rmdir /opt/var/lib/mysql
#create a directory elsewhere (here dir database)
mkdir /tmp/mnt/disc0_3/database
#make a symbolic link to it
ln -s /tmp/mnt/disc0_3/database /opt/var/lib/mysql
#END OF MOVE MYSQL DATABASE

4.) finally create a new database, issue a
/opt/bin/mysql_install_db
reboot
5.) mysql -u root
6.) use mysql;
7.) update user set Password = PASSWORD('mypasswd') where User ='root';
8.) create database serendipity;
9.) grant ALL PRIVILEGES on serendipity.* to root@localhost;
10.) set password for root@localhost = password('mypasswd');
11.) flush privileges;
12.) exit;
13.) create a directory: mkdir /tmp/mnt/disc0_3/blog
14.) cd /tmp/mnt/disc0_3/blog
15.) wget http://prdownloads.sourceforge.net/php-blog/serendipity-1.5.5-lite.zip?download
16.) tar -zxf serendipity-1.5.5-lite.zip
17.) chown -R root:root /tmp/mnt/disc0_3/blog/serendipity
18.) ln -s /tmp/mnt/disc0_3/blog/serendipity /opt/share/www/blog
19.) now start serendipity with your browser (IE; Forefox - the Initialisation take a few seconds):
http://your.ip.of.asus/blog
20.) use database serendpity and user root with mypasswd (item 7.), keep everything as suggested, even language
for administration choose a user as you want and a strong password, then save everything
21.) now start serindipity again with http://your.ip.of.asus/blog and open the login screen (right bottom)
22.) log in with your user and password and go to administration, configuration, general settings
choose your language and set under charset selection to native (your database is always utf8, hence use native)
23.) save everything, you should get no error message
24.) Now your Blog-system is ready to use http://ip.of.your.asus/blog


hint: when you want to enter mysql again, use: mysql -u root -p
enter mypasswd
do not forget howto leave mysql: exit;

For more informations/documentation goto http://www.s9y.org (the home of serendipity)
If you want to install a full version of serendipity, you still can use this howto, just change the addresss and name
of 15.) and 16.)

Any suggestions or improvements a.s.o. are greatly appreciated

And a special thanks to WTPE for the mysql suggestions and solutions.

Here you can find a screenshoot. (http://www.wl500g.info/attachment.php?attachmentid=8082&d=1306186517)
Enjoy!
Newbiefan

jeremees
09-01-2012, 20:18
Thank you for this HowTo. I used it for guideline for installing PHP-Fusion.
I just don't understand this line? :confused:


18.) ln -s /tmp/mnt/disc0_3/blog/serendipity /opt/share/www/blog

Why that link? In wpte's html guide to html is told to make harddisk folder already webserver folder in lighttp.conf file. So why to link to that opt/share/www?

newbiefan
10-01-2012, 06:20
Thank you for this HowTo. I used it for guideline for installing PHP-Fusion.
I just don't understand this line? :confused:



Why that link? In wpte's html guide to html is told to make harddisk folder already webserver folder in lighttp.conf file. So why to link to that opt/share/www?

Well, it's just a symbolic link to your webserver, therefore your blog can be stored anywhere. In case your webserver is stored on a own hdd (or you have enough remaining place), store everything there without symlink.
Newbiefan