FreeBSD installation (Kimsuk original
2004-6-29
)
Start initial installation. Skip the kernel configuration. Select Quick installation. Quick Install.
Assign hard disk space :(
18g
Hard disk example)
/
3.0
/ home
3.0
/ usr
6.0
/ var
1.6
/ TMP
1.4
SWAP
2.0
Install ports, SRC (source code)
Install Bash.
Create a new WHEEL group user, pay attention to the input shell path as / usr / local / bin / bash.
Install / USR / PORTS / MISC / GNULS Make MakeInstall
Modify / etc / profile file:
PS1 = "[/ u @ / h / w] // $"
INPUTRC = / etc / inputrc
LANG = ko_kr.euc
Export ps1 inputrc lang
Alias ls = "gnuls --color"
Modify the kernel supporting dual CPU
Enter catalog / USR / SRC / SYS / I386 / CONF
Discover generic files. Then put it in the / src folder with additional mygeneric.
# CD / USR / SRC
# make buildkernel kernconf = mykernel
# make installkernel kernconf = mykernel
View CPU Status: Dmesg | grep -i CPU
Add new hard disk / stand / sysinstall Select the FDISK partition, W Write, select the LAB configuration.
Then manually written to / etc / fs * file.
/ dev / da0s
Allf
/ usr
UFS
RW
2
2
/ dev / da1s1e
/ OURSERVER
UFS
RW
2
2
PROC
/ proc
PROCFS
RW
0
0
The hard disk is hung up.
Install MySQL 5.0 Database
Directly exempt from the version, decompression can be used.
Execute ./script/mysql_install_db initializes the database.
#ProupAdd MySQL
# Pw useradd mysql -g mysql -s / nonnexistent
It is forbidden to log in to the SSH method.
Chown -r root / usr / local / mysql
Chown -r mysql / usr / local / mysql
/ BIN / SAFE_MYSQL &
/ bin / mysqladmin -u root password 'PPP'
Copy the mysql.server to /usr/local/etc/rc.d/mysql.sh in the Support folder
Apache
2.0.48
Version PHP4.3.2 version
Compile Apache directly: ./ Configure --prefix = / www --enable-so
Compile PHP directly
4.3.2
: Easy to modify the conf file in PHP.
./configure --with-mysql = / usr / local / mysql --with-apxs2 = / www / bin / apxs --enable-track-vars --enable-force-cgi-redirect --Nable-Pic ENABLE-INLINE-OPTINATION --ENABLE-MEMORY-LIMIT --ENABLE-BCMATH --ENABLE-SHMOP --ENABLE-VERSIONING --ENABLE-Calendar --Nable-DBX --Enable-Dio --Nable-MCAL --with -config-file-path = / www / conf --with-gd = / usr / local / gd --enable-sockets --with-jpeg-dir = / usr / local / jpeg-6b --with-PNG- DIR = / usr / local / libpng copy configuration file
CP php.ini-dist /www/conf/php.ini
Modify httpd.conf
1, Listen 202.4.142.209:80 # here for your server IP address
2, find LoadModule php4_module modules / libphp4.so lines, add AddType application / x-httpd-php .phpAddType application / x-httpd-php .php3AddType application / x-httpd-php .phtmlAddType application / x-httpd-php below -Source .phps
3, look for serveradmin you@your.address, change the content to ServerAdmin
4, find documentroot "/ usr / local / apache / htdocs", change the content to documentroot "/ usr / home / peng / web"
5, find directoryindex index.html index.html.var, change the content to DirectoryIndex index.html index.html.var index.php index.php3 index.phtml index.htm
6, look for AddDefaultCharset ISO-8859-1, change the content to AddDefaultCharset GB2312.
Attachment: PHP compiled full parameters
Full statement
./configure
--Prefix = / usr / local / PHP
--with-apxs2 = / usr / local / apache / bin / apxs
--with-mysql = / usr / local / mysql
--enable-track-vars
--with-config-file-path = / usr / local / lib
--with-gd = / {$ prefix} # GD2.0 installation path
--enable-gd-native-ttf
--Nable-GD-JIS-CONV
--with-freetype-dir = / usr / local / freetype
--with-jpeg-dir = / usr / local / jpeg-6b
--with-png-dir = / usr / local / libpng
--with-xpm-dir = / usr / local / xpm / lib
--with-curl = / usr / local / curl
--with-zlib
--enable-xml
--enable-dba
--enable-dbase
--enable-filepro
--enable-ftp - enable-versioning
--enable-memory-limited
--enable-calendar
--enable-session
--enable-sockets
--enable-sysvsem
--enable-sysvshm
--enable-tokenizer
--enable-overload
--with-inIfile
--with-hyperwave
--enable-ctype
--with-openssl = / usr
Continue the configuration of the php.ini file, execute the following command:
#vi /www/conf/php.ini
(1) Find max_execution_time = 30, change to max_execution_time = 600
(2) Find MAX_INPUT_TIME = 60, change to max_input_time = 600
(3) Find Memory_Limit =
8M
Change to Memory_Limit =
20m
(4) Look for Display_errors = ON, change to display_errors = OFF
(5) Find register_globals = OFF, change to register_globals = on
(6) Find post_max_size =
8M
Change to Post_MAX_SIZE =
20m
(7) Find UPLOAD_MAX_FILESIZE =
2M
Change to UPLOAD_MAX_FILESIZE =
20m
(8) Find session.auto_start = 0, change to session.auto_start = 1
Execute: wq! Command After saving, complete the configuration of the PHP.INI file.
#vi apache.sh
Add the following:
/ usr / local / apache / bin / apachectl start &
#Chmod 777 apache.sh
PrOFTPD installation:
If you are using FreeBSD 4.x, you need to "# Same Requirement for ftpd as login" in /etc/pam.conf
Paragraph plus
FTPD Account Required Pam_Unix.so Try_First_Pass
ftpd session request pam_persermit.so
# PW useradd -g group name -m -s / bin / false username
# 建立 本 Nogoodbird Because it does not have a shell, you can't ssh but you can ftp!
Establish /Home/ftp/welcome.msg file, the variables that can be used are as follows:
From% R
Connection upper limit:% M people, current:% n
% L FTP server name
% C Currently the FTP directory name
% F Current Space Size remaining in the directory segmentation area
% T FTP Server Host Time
% E ftp server's E-mail account
% M The same group can allow up to several users to log in
% R users originally the name of the host
% U Login User Name
% U Vertified user name via RFC931
% N The same group is currently log in to the number of users
There are two solutions:
1. Since we need / var / run / proFTPD, we will create a good manual. Tested, success;
2. Modify the /usr/local/etc/proftpd.conf file, add a line:
ScoreboardFile /var/run/proftpd/proftpd.scoreboard
If the MySQL FTP user is inadvertently built when it is created, it can be solved by disabling its SSH landing method.
In this file, the last junction line is inserted into one / etc / ssh / sshd_config
AllowUsers Kimsuk Kimsuk2