If you are new to linux, don't worry. It may look like much, but it isn't. Also where it says vi you can use nano instead.
Bubba2 owners: Also read post http://forum.excito.net//viewtopic.php?t=981 as the Debian and MySQL version differs from the Bubba1 and php5 and MySQL has been pre-installed.
Note: This post is kept up-to-date with the comments and msn contacts made in this thread.
Last update: 1 nov 2008
Packages
Install the packages, using the Debian sources, see Howto install Debian packages [3].
Code: Select all
apt-get install mysql-server
apt-get install wget php4-gd php4-mysql unzip
Next download the php-fusion software [1] onto your bubba
Code: Select all
cd /tmp
wget http://surfnet.dl.sourceforge.net/sourceforge/php-fusion/php-fusion-6-01-13-full.zip
Now we have a MySQL database running, we need to configure it so it runs with a minimal memory footprint [2] and create a database for php-fusion.
Configuration
Edit the MySQL config
Code: Select all
vi /etc/mysql/my.cnf
When changes are made, restart MySQL by issueing:[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
language = /usr/share/mysql/english
skip-external-locking
bind-address = 127.0.0.1
key_buffer = 32K
max_allowed_packet = 1M
thread_stack = 64K
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
query_cache_limit = 1048576
query_cache_size = 8388608
query_cache_type = 0
log-slow-queries = /var/log/mysql/mysql-slow.log
log-bin = /var/log/mysql/mysql-bin.log
max_binlog_size = 104857600
skip-bdb
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
[isamchk]
key_buffer = 16M
Code: Select all
/etc/init.d/mysql restart
You should now assign a root password to the server, drop the guest account and remove certain built-in databases you don’t need.
Code: Select all
mysql -u root
Code: Select all
mysql> DELETE FROM mysql.user WHERE User = '';
mysql> UPDATE mysql.user SET Password = PASSWORD('some_pass') WHERE User = 'root';
mysql> DELETE FROM mysql.user WHERE Host <> 'localhost';
mysql> UPDATE mysql.user SET Host = '%';
mysql> drop database test;
mysql> FLUSH PRIVILEGES;
mysql> quit;
Code: Select all
mysql -uroot -p mysql
In the example below, the database phpfusion is created and a database user phpfusion with password changeme.
Code: Select all
mysql> insert into user values ('localhost','phpfusion',password('changeme'),'Y','Y','Y','Y','Y','Y','N','N','N','N','N','N','N','Y','N','N','Y','Y','Y','N','N','N','N','N','N', 0, 0, 0);
mysql> flush privileges;
mysql> create database phpfusion;
mysql> exit
Install
Unzip the PHP-Fusion package on the bubba and restart Apache.
Code: Select all
mkdir /var/www/html/phpfusion
cd /var/www/html/phpfusion
unzip /tmp/php-fusion-6-01-13-full.zip
chown -R www-data:www-data /var/www/html/phpfusion
/etc/init.d/apache2 restart
Read the php-fusion readme in the /var/www/html/phpfusion/ directory.
Setup1. Before you upload the files, rename the file blank_config.php (located in the folder entitled php-files) to config.php.2. Upload the contents of the php-files folder to your web-server.Code: Select all
mv /var/www/html/phpfusion/php-files/blank_config.php /var/www/html/phpfusion/php-files/config.php
3. Unless you are running PHP-Fusion on a local server, in most cases you will need to CHMOD the following files & folders to 777:You can ignore this step as you already did this.4. Goto your website, setup.php should start automatically, if it does not appear you should run setup.php manually by entering your full site url followed by /setup.php.Code: Select all
cd /var/www/html/phpfusion/php-files chmod 777 administration/db_backups/ chmod 777 images/ chmod 777 images/imagelist.js chmod 777 images/articles/ chmod 777 images/avatars/ chmod 777 images/news/ chmod 777 images/news_cats/ chmod 777 images/photoalbum/ chmod 777 images/photoalbum/submissions/ chmod 777 forum/attachments/ chmod 777 config.php
5. Complete the setup process by following all on-screen prompts.6. Immediately after completing the installation of PHP-Fusion you must CHMOD config.php back to 644 AND delete setup.php from your web-server.For the Database Hostname, you can accept the default: localhostCode: Select all
rm /var/www/html/phpfusion/php-files/setup.php chmod 644 /var/www/html/phpfusion/php-files/config.php
You are ready to setup your site!
Surf to your site: http://bubba/phpfusion/php-files/
and login with the administrator account you have created during the configuration.
Have fun
Eek
PS. If you are not sure if this is something for you, you can test it at http://www.opensourcecms.com/index.php? ... iew&id=464, it is a Try Before you Install.
References
- 1. http://php-fusion.co.uk
2. http://forum.excito.net/viewtopic.php?t=420
3. http://forum.excito.net/viewtopic.php?t=421
If you want to expose your new phpfusion site to the outside, you need to open ports on your router. As you possibly only want to expose phpfusion to the outside, you can create a virtual host in Apache that listens on another port. Next you can use the port forwarding in your router to forward port 80 to the bubba on the new port.
You can use the following instructions to create an Apache virtual host on port 8083
Code: Select all
cd /etc/apache2/sites-available
vi phpfusion
Enable the site and restart ApacheListen 8083
NameVirtualHost *:8083
<VirtualHost *:8083>
ServerAdmin webmaster@something.com
DocumentRoot /var/www/html/phpfusion/php-files
DirectoryIndex index.html index.htm index.cgi index.pl index.php index.xhtml
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/html/phpfusion/php-files>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/phpfusion_error.log
LogLevel warn
CustomLog /var/log/apache2/phpfusion_access.log combined
ServerSignature On
Alias /icons/ "/usr/share/apache2/icons/"
<Directory "/usr/share/apache2/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Code: Select all
cd /etc/apache2/sites-enabled
ln -s /etc/apache2/sites-available/phpfusion
/etc/init.d/apache2 restart
Note: the virtual host has its own error logs and access logs. This is also very handy if you want to check your site errors or statistics. I use webalizer to analyze my web-traffic.