Saturday, February 14, 2009

Elgg 配置

Download Elgg from http://elgg.org

Unzip elgg1.2.zip to temp folder ;
>Cd ~
>unzip elgg1.2.zip
>cp -r elgg1.2 /var/www
>cd /var/www
>mv elgg1.2 elgg //rename folder name

Sudo chmod -R 777 elgg

Config Apache2 server, enable mod_write and .htaccess, like this:

Sudo vi /etc/apache2/sites-available/default

Add content below:


    AllowOverride All


Then enable Apache2 mod_write function:

>Sudo a2enmod rewrite

To disable this module it's just:
>sudo a2dismod rewrite

Then edit php.ini:

>sudo vi /etc/php5/apache2/php.ini
Add:
sendmail_path = /usr/sbin/sendmail -i -t


Then config mysql:

Mysql -u root -pxxxxxx
mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'something' WITH GRANT OPTION;
Mqsql>FLUSH PREVILEGES;
Mqsql>Create database elgg
Mqsql>Quit

Then restart mysql server:

Sudo /etc/init.d/mysql restart

http://xxx.xxx.xxx.xxx/elgg/

Done!

Friday, February 13, 2009

Test Ez Publish 4.0.2

2009/2/13,In my ubutun server in VMware, I test install Ez publish 4.0.2 CMS system.
Download Ez Publish from http://ez.no, copy file to share directory, so my vmware ubutun can see the file.
config mysql database
mysql -u root -pmypassword //replace real passwd to mypassword, no space after'-p'.
Create new database:
CREATE DATABASE ezpublish CHARACTER SET utf8;

GRANT ALL ON ezpublish.* TO ezpublish@localhost IDENTIFIED BY 'ezpublishsqlpassword';
FLUSH PRIVILEGES;


Then I uncompress eZ Publish:
cd ~/share
tar zxvf ezpublish-4.0.0-gpl.tar.gz -C /var/www

This creates the directory ezpublish-4.0.0 in /var/www which I rename to ezpublish:
mv /var/www/ezpublish-4.0.0 /var/www/ezpublish
Then we should change 'Php.ini' , change 'mem_limits=16M' to 'mem_limits=64M', because Ez publish need 64M memory in PHP:
cd /etc/php5/apache2/
sudo vi php.ini

Then we need restart apache server:
/etc/init.d/apache2 restart
Next we need to install "imageMagick":
sudo apt-get install imagemagick
Next we set proper access permision:
cd /var/www/
sudo chmode -R a+rwx ezpublish

Now, we can visit "http://192.xxx.xxx.xxx/ezpublish/index.php" to continue install ezpublish. It really work.

Install Samba in Ubuntu

In my ubuntun server in VMWare, I test samba which I use to tranfer file between host XP system with VMware ubuntun server.
First, backup the original config file: /etc/samba/smb.conf like this:
> cd /etc/samba
> sudo cp smb.conf smb.conf.old
> sudo cp smb.conf smb.conf.master
> sudo vi smb.conf.master
Only Add a new share directory [share], don't change other contents.
Create a new subdirectory in your home directory, my home directory is /home/wjh,
I create a subdirectory 'share' under '/home/wjh', and change the access permit:
>cd /home/wjh
>mkdir share
>chmod 666

Edit '/etc/samba/smb.conf.master, add content below:
[share]
read only = no
locking = no
path = /home/wjh/share
guest ok = yes
browseable = yes

run ' testparm -s smb.conf.master >smb.conf '
restart samba server: /etc/init.d/samba restart

In the XP, you can search host, in address bar "//192.xxx.xxx.xxx/share", then you can visist sambar share directory