A simple installation freeBSD system + add users + set network + installation web service + mysql + php

xiaoxiao2021-03-06  41

FreeBSD installation 1 Select Skip Kernel ..... 2 stantard install3 Press a Use Entire Disk Press Q End 4 Select Bootmgr5 Partition: Press C to create, SWAP should be twice the memory, / usr 8g / var 4g / home 10g Appropriate adjustment 6 remaining points to the root directory / 7 Select the installation component: Kern - Developer8 Whether to install the Ports Collection Original code Select YES (default)

9 Select CDROM Installation 10 Configuration (You can Select NO) 11 Select EXIT Restart

System configuration setting password: passwd [myuser] Add Group: PW Group Add [myGroup] Add User: PW user add [myuser] -d [myHomedir] -g [myGroup] Configuring Network View NIC: ifconfig Remember Status: Active Net card name, such as fxp0 set IP: vi /etc/rc.conf Added content in the following format IFCONFIG_N card name = "INET IP address NetMask subnet mask" defaultrouter = "gateway" Hostname machine name, for example: ifconfig_fxp0 = " inet 10.71.111.160 netmask 255.255.255.128 "defaultrouter =" 10.71.111.129 "hostname wappush provided dns /etc/resolv.conf nameserver 10.72.255.100 set the host name / etc / hosts 127.0.0.1 localhost localhost.my.domain 10.71.111.160 wappush Update Settings / etc / NetStart Installation Services Creating / Data0 / Data1 / Data2 Mkdir / Data0 ... Install Apache-1.3.27-FreeBSD4.8STABLE.TAR.GZ to / Data0 PW Group Add WWW PW User Add WWW -G WWW -S / SBIN / NOLOGIN CD / DATA1 TAR -ZVXF /DATA0/Apache 1.3.27-Freebsd4.8stable.tar.gz Echo "/ DATA1 / APACHE / BIN / APAC HECTL Stop ">> /etc/rc.local echo" / data1 / apache / bin / apachectl start ">> /etc/rc.local / data1 / apache / bin / apachectl start modification / data1 / apache / conf / httpd. Conf DocumentRoot points to a script directory, such as / data1 / apache / share / htdocs / php settings default page DirectoryIndex index.html index.php installation mysql /data0/mysql-3.23.58-freebsd4.8stable.tar.gz file exists PW group add mysql pw user add mysql -g mysql -s / sbin / nologin cd / data2 tar -zvxf /data0/mysql-3.23.58-freebsd4.8stable.tar.gz chown -r mysql: mysql / data2 / mysql / Var echo "/ data2 / mysql / bin / safe_mysqld -u mysql &" >>

/etc/rc.local / data2 / mysql / bin / safe_mysqld -u mysql & into mysql / data2 / mysql / bin / mysql -uroot mysql delete from user where user = ''; flush privileges; Update User set password = Password 'huaweimysqlroot') where user = 'root'; add user GRANT ALL PRIVILEGES ON mobilerc for a database * tO mobilerc @ localhost IDENTIFIED BY 'huaweimysql';. FLUSH PRIVILEGES; set a password update user set password = password for a user ( ' HuaweiMysqlmobilerc ') Where user =' mobilerc '; install php /data0/php-4.3.10.tar.gz file There is tar -zvxf php-4.3.10.tar.gz CD PHP-4.3.10 ./configure --PREFIX = / data1 / php --with-pear = / data1 / php / lib / php --with-apxs = / data1 / apache / bin / apxs --with-mysql --With-config-file-path = / data1 / PHP / LIB Make Make Install CP php.ini-dist /data1/php/lib/php.ini integration LS / DATA1 / APACHE / LIBEXEC Make sure there are two files httpd.exp libphp4.so grep libphp / data1 / apache / Conf / httpd.conf If the result is not loadModule PHP4_Module Libexec / libphp4.so added it. It is best to add: addtype application / x-httpd-php. Php. Phtml addtype application / x-httpd-php-source. Phps grep php /data1/apache/conf/mime.Types If the result is not Application / X -HTTPD-PHP PHP Application / X-httpd-php-source PHPS Add to Ratose Apache / Data1 / Apache / BIN / Apachectl Restart Display Success You can test the path to the hand of documentroot in httpd.conf, edit the test in this directory The file info.php content is as follows Enter the URL using the browser to access the page.

转载请注明原文地址:https://www.9cbs.com/read-55164.html

New Post(0)