Use puppy to be a server (detailed)
Posted: Wed 02 Jun 2010, 05:19
Install puppylinux to the hard disk ,you will only use 30M of memory when your PC were boot.
First of all, you need to partition the hard disk in accordance with district.
Remember, the hard disk must have one active partition, otherwise your PC will not find a bootable media and won't boot.
Set in accordance with the following methods it will work.
Then install the puppy to your hard disk.
General election:
Choose "Internal (IDE or SATA) hard drive"
Next.
select where are you install from, a CD or from dictinary .
You can eeference other article for Puppy Universal Installer
Save the menu.lst file, the installation was successful.
Reboot ..
--------------------------------------------------------------------------------------------
Let puppy boot into the the command line and do not into graphical interface .
Open /etc/profile
find "exec xwim"
edit this line to be "# exec xwim"
Let puppy does not automatically login root account, and to manually login
Open /etc/inittab
make this line "tty1::respawn:/sbin/getty -n -l /bin/autologinroot 38400 tty1"
to be "tty1::respawn:/sbin/getty 38400 tty1"
Then install All softs,chick here to downland.
After the completion of what you need to configure mysql.
Enter the following command sequence:
then input your Password:
Then modify /etc/rc.d/rc.local
Add at the end:
Server normal startup.
Open you other PC's browser view it.
--------------------------------------------------------------------------------------------
Create a database on mysql:
# /usr/local/bin/mysql/bin/mysql
mysql> create database phpbb;
Query OK, 1 row affected (0.01 sec)
mysql> grant all on phpbb.* to bbsadmin@localhost identified by 'passwd';
Query OK, 0 rows affected (0.00 sec)
Then you can use this database.
db name:phpbb
db user:bbsadmin
db passwd:passwd
Go~ let go to install a phpbb or other~
First of all, you need to partition the hard disk in accordance with district.
Remember, the hard disk must have one active partition, otherwise your PC will not find a bootable media and won't boot.
Set in accordance with the following methods it will work.
Then install the puppy to your hard disk.
General election:
Choose "Internal (IDE or SATA) hard drive"
Next.
select where are you install from, a CD or from dictinary .
You can eeference other article for Puppy Universal Installer
Save the menu.lst file, the installation was successful.
Reboot ..
--------------------------------------------------------------------------------------------
Let puppy boot into the the command line and do not into graphical interface .
Open /etc/profile
find "exec xwim"
edit this line to be "# exec xwim"
Let puppy does not automatically login root account, and to manually login
Open /etc/inittab
make this line "tty1::respawn:/sbin/getty -n -l /bin/autologinroot 38400 tty1"
to be "tty1::respawn:/sbin/getty 38400 tty1"
Then install All softs,chick here to downland.
After the completion of what you need to configure mysql.
Enter the following command sequence:
Code: Select all
addgroup mysql
adduser -G mysql mysql adduser-G mysql mysql
Code: Select all
then go on:
cp /usr/local/mysql/share/mysql/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql var
chgrp -R mysql .
bin/mysqld_safe --user=mysql &
Add at the end:
Code: Select all
echo -e "\033[0;33;1mStarting services...\033[0m" >/dev/console
echo -n " dhcpcd eth0" >/dev/console
/usr/sbin/dhcpcd eth0
sleep 3
echo -n " Cronjob" >/dev/console
/usr/sbin/crond &
echo -n " Openssh" >/dev/console
/usr/local/sbin/sshd &
echo -n " Apache2" >/dev/console
/usr/local/apache2/bin/apachectl start
echo -n " MySQL" >/dev/console
/usr/local/mysql/bin/mysqld_safe --user=mysql &
echo -n " Pure-ftp" >/dev/console
/usr/sbin/pure-ftpd -S 21 -4 -A -c 10 -C 5 -H -i &
#echo -n " Starting nat for eth1" >/dev/console
#sysctl -w net.ipv4.ip_forward=1
#iptables -F
#iptables -P INPUT ACCEPT
#iptables -P FORWARD ACCEPT
#iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
#ifconfig eth1 192.168.0.1 netmask 255.255.255.0
Server normal startup.
Open you other PC's browser view it.
--------------------------------------------------------------------------------------------
Create a database on mysql:
# /usr/local/bin/mysql/bin/mysql
mysql> create database phpbb;
Query OK, 1 row affected (0.01 sec)
mysql> grant all on phpbb.* to bbsadmin@localhost identified by 'passwd';
Query OK, 0 rows affected (0.00 sec)
Then you can use this database.
db name:phpbb
db user:bbsadmin
db passwd:passwd
Go~ let go to install a phpbb or other~