Install web-cp 0.6 on CentOS4 | RHEL4 | Whitebox 4
Warning: DO NOT RUN 0.6 IN PRODUCTION YET
- Before you begin
- Read the previous warning, do not install 0.6 unless you know what you are doing. Most likely, you'll want to use these instructions: FedoraCore1
- Run yum update && yum upgrade or up2date -u to ensure that all packages are up to date.
- Note that steps marked with an asterisk (*) are optional.
- Note that these instructions are for installing the 0.6 development version of web-cp. This version is not supported, will break, will not be upgradable and is for development only at this time.
Install packages via Yum jjjj
Required Packages
(these packages are likely to be installed already but if they are not, run the yum command to install them)
Optional Packages*
Configure MySQL
Start MySQL Server
service mysqld start
Setup the webcp user
mysql -u root
mysql> GRANT ALL PRIVILEGES ON *.* TO 'webcp'@'localhost' IDENTIFIED BY 'yourwebcppassword' WITH GRANT OPTION;
mysql> quit
Configure PHP
Edit php.ini ( nano /etc/php.ini )
- Change magic_quotes_gpc Off to magic_quotes_gpc On
Install web-cp
Create webcp home and user
groupadd webcp
useradd -s /sbin/nologin -g webcp -d /home/webcp -c "webcp user" webcp
Download and copy web-cp to the correct location
cd /root
cvs -d :pserver:guest@cvs.web-cp.net:/usr/local/cvsroot login
cvs -d :pserver:guest@cvs.web-cp.net:/usr/local/cvsroot checkout webcp-0.6
mv webcp-0.6/webcp/* /home/webcp -f
chown webcp:webcp /home/webcp -R
chown root:root /home/webcp/server -R
chmod 755 /home/webcp
chmod 777 /home/webcp/tag
chmod 755 /home/webcp/server/webcp.php
chmod 755 /home/webcp/server/webcp-httpd.php
chmod 755 /home/webcp/server/data -R
Copy the init file
cp /home/webcp/server/webcp-init.php /etc/init.d/webcp
chmod 755 /etc/init.d/webcp
Create the necessary log and pid files
touch /var/log/webcp.log
chown webcp.webcp /var/log/webcp.log
chmod 600 /var/log/webcp.log
touch /var/log/webcp-access
chown webcp.webcp /var/log/webcp-access
chmod 777 /var/log/webcp-access
mkdir -p /var/run/webcp
chown webcp:webcp /var/run/webcp
chmod 777 /var/run/webcp
If you are going to configure web-cp remotely (execute the setup script from a location other than localhost) you must create a basic config file
touch /home/webcp/config.php
Edit config.php ( nano /home/webcp/config.php )
- Add <? $cfg['sysname'] = 'YOUR.SERVER.IP.ADDRESS'; ?>
Add a rule to accept packets
iptables -I INPUT -p tcp --dport 81 -j ACCEPT
Start webcp (ignore any mysql warnings you receive at this point)
service webcp start
Enable Quotas*
(only complete this if you installed quota support)
Edit /etc/fstab to enable quotas ( nano /etc/fstab )
- Change defaults to defaults,usrquota on the line containing the proper mount point (/ or /home)
Remount the partition
mount -o remount / or mount -o remount /home_
Run quotacheck
quotacheck -cvugamf
Enable quotas
quotaon -a
Configure vsftpd*
Edit shells ( nano /etc/shells )
- Add /bin/false to a new line at the end of the file
Edit vsftpd.conf ( nano /etc/vsftpd/vsftpd.conf )
- Add chroot_local_user=YES to a new line at the end of the file
Start vsftpd
service vsftpd start
Run the web-cp setup process
Visit yourserver:81 to run the web-cp setup process.
Congratulations - you're done!