>! Installation
* Select \'\'Standard\'\'
* \'\'Delete all\'\' current partitions
* Boot Manager Select \'\'Boot Mgr\'\'
* Disk Label Editor: \'\'Create disk partitions\'\': The 2nd partition (SWAP) should be 2x the amount of RAM installed. Partitions /, /tmp, and /var can stay rather small (use the defaults above) no matter how big your HD is.
2GB FS Mount Point: /
1GB SWAP
1GB FS Mount Point: /tmp
1GB FS Mount Point: /var
10GB FS Mount Point: /usr
all remaining FS Mount Point: /home
* Select Distribution \'\'Choose All\'\'
* Ports Collection \'\'Yes\'\' you want the ports skeleton (you\'ll go back to the Select Distribution screen. Scroll up, select \'\'Exit\'\'
* Installer Source Select \'\'CD/DVD or FTP\'\' if internet connection is good
* Last Chance Hell, yeah. Delete everything, reformat the HD, give me some BSDLove. FreeBSD creates the filesystems that you named in the Disk Label Editor, and begins installing stuff. During the installation, you can see what\'s going on in a number of different views:
ALT-F1 - default GUI view
ALT-F2 - verbose installation log
ALT-F4 - emergency interactive shell
* After extracting the source, and installing the source, you\'ll get to a screen that says:
* Congratulations , \'\'Hit OK\'\' and move on... Configuration
>! Configuration
1. would you like to configure any ethernet or SLIP/PPP network devices?
Yes
2. Select Your Network Card ,
Select the first option unless you\'re sure your network card is one of the other options
3. try IPV6?
No
4. try DHCP?
No
5. Network Info: host and servername - If you want your server to be \"foo.example.com\", enter \"foo\" here, Domainexample.com - enter the rest of your net info, click OK
6. function as a network gateway?
No
7. inetd and network services that it provides?
No
8. enable SSH?
Yes
9. anonymous FTP?
No
10. NFS server?
No
11. NFS client?
No
12. customize system console settings?
No
13. Set this machine\'s timezones now?
Yes
14. Linux binary compatibility?
Yes - this should let you run compiled linux binaries through FreeBSD\'s emulator.
15. Does this system have a PS/2, serial, or bus mouse?No - mice are for wimps.
16. FreeBSD Package Collection - Browse the collection now?No - we\'ll add ports later on
17. Add any initial user accounts?
Yes , Select User; hit Enter
Login ID: web
UID: default
Group: leave blank
Password:
*
Full Name: Web Master
Member Groups: wheel
Home Directory: /home/web
Login Shell: /bin/sh
18. Set Root\'s Password
19. Visit the general configuration menu for a chance to set any last options?No
20. Use the right arrow to select Exit Install, Hit Enter
21. Are you sure you want to exit? Hell, fricken\' yes, I\'m sure. Your system will restart. Remove the install CD, and behold your new FreeBSD webserver
FreeBSD has a very standard directory structure:
/boot -> kernel and any other bootable files
/root -> The user, \"root\", home directory
/bin -> System binary executables runnable by root and normal users
/sbin -> System binary executables runnable only by root
/lib -> System shared library files
/var -> Logs, runtime process locks
/etc -> System configuration
/tmp -> Temporary files
/usr -> Userland files (non-system)
/usr/home -> Users\' homes
/usr/lib /usr/bin /usr/sbin -> Same as previous except non-system
/usr/local -> Userland files specific to the local installation
/usr/local/lib /usr/local/bin /usr/local/ec -> Same as previous except for
locally installed applications
http://www.cyberciti.biz/faq/unix-linux-finding-files-by-content/
http://www.jkraft.fr/2008/11/17/freebsd-installation-et-utilisation-de-rsync/
Команды #
system##
ls -l - список всех файлов
ping google.com
freebsd-update fetch
freebsd-update install
rehash
whereis nano
dig warfish.com
drill warfish.com
mv /etc/file.conf /etc/file.conf.backup
nano /etc/file.conf
ee /etc/file.conf
reboot
pkg upgrade
pkg audit -F
pkg autoremove
pkg fetch
freebsd-update fetch
freebsd-update install
mysql##
pkg install php55-mysql php55-mysqli
pkg install mysql55-server
sysrc mysql_enable=yes
service mysql-server start
mysql_secure_installation
pkg install phpmyadmin
php##
cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini
sysrc php_fpm_enable=yes
service php-fpm start
ee /usr/local/etc/php-fpm.conf
ee /usr/local/www/nginx/info.php
service php-fpm restart
pkg install phpmyadmin
pkg install php5-filter
pkg install php56-filter
pkg install php-extentions
pkg install php56-mbstring
whereis php56
whereis php5
pkg install php56-extensions
service php-fpm restart
pkg install pecl-intl
pkg install php5-exif
pkg search php
service php-fpm restart
sftp##
whereis sftp-server
sudo /usr/libexec/sftp-server
mail##
cd /etc/mail
make
make restart
cd /etc/mail/certs
openssl dhparam -out dh.param 4096
ssh##
/etc/rc.d/sshd restart
ddclient##
pkg install ddclient
ddclient -i
ddclient restart -noquiet -debug
ddclient stop
ddclient start -noquiet -debug
ddclient -noquiet -debug
ddclient status
ddclient restart
ddclient -force
ddclient -noquiet -debug
sysrc ddclient_enable=yes
nginx##
pkg install nginx
mkdir -p /var/log/nginx
touch /var/log/nginx/access.log
touch /var/log/nginx/error.log
rm -rf /usr/local/www/nginx
mkdir /usr/local/www/nginx
cp /usr/local/www/nginx-dist/index.html /usr/local/www/nginx
service nginx restart
sysrc nginx_enable=yes
sudo mkdir -p /var/www/warfish.com/
mkdir -p /var/www/warfish.com/
chown -R $USER:$USER /var/www/warfish.com/
sudo chmod -R 755 /var/www
chmod -R 755 /var/www
cp /etc/nginx/sites-available/default /etc/nginx/sites-available/warfish.com
packages and soft##
pkg install nano
pkg install sudo
pkg install ispconfig
pkg install dnsutils
pkg install weechat
pkg delete nano
other##
adjkerntz -a
pkg fetch
freebsd-update fetch install
freebsd-update fetch
freebsd-update install
pkg audit -F
pkg update
pkg upgrade
whereis php5-extensions
pkg search php5-extensions
pkg search php5
cd /usr/ports/lang/php5-extensions
make config
pkg upgrade
pkg fetch
pecl download fileinfo
pkg search php56
pkg install php56-fileinfo
pkg install php56-exif
pkg install php56-curl
pkg install php56-ldap
pkg install php56-apc
pkg install php-apc
pkg install pecl-APC
pkg search php apc
pkg search apc
pkg install pecl-APCu
service nginx restart
service php-fpm restart
pkg install php56-pdo
pkg search pdo
pkg install php56-pdo_mysql
netstat -na | grep LIST
Aliases##
which python3
alias python /usr/local/bin/python3.2
users and groups stored in /etc/group and /etc/passwd. To print:
awk -F":" '{print }' /etc/passwd
awk -F":" '{print }' /etc/group