SyntaxHighlighter

2012年9月26日星期三

Arch on VPS

Network
ip link set eth0 up
ifconfig eth0 199.30.51.60 netmask 255.255.0.0(255.255.255.0??)
route add default gw 199.30.48.1
vi /etc/resolv.conf [+nameserver 8.8.8.8]

Setup
/arch/setup
Server = http://mirrors.cicku.me/archlinux/$repo/os/$arch
Server = http://mirrors.lax1.thegcloud.com/arch/$repo/os/$arch
Server = http://mirrors.xmission.com/archlinux/$repo/os/$arch
Server = http://mirrors.cat.pdx.edu/archlinux/$repo/os/$arch
Server = http://mirrors.kernel.org/archlinux/$repo/os/$arch
Server = http://ftp.osuosl.org/pub/archlinux/$repo/os/$arch

Grub
ALT+CTRL+F6
cd /mnt
mount -t proc proc proc/
mount -t sysfs sys sys/
mount -o bind /dev dev/
mount -t devpts pts dev/pts/
chroot /mnt
pacman-key --init [hit your keyboard!]
pacman-key --populate archlinuxv
pacman -Syu #update system
pacman -S grub-bios
modprobe dm-mod
grub-install --target=i386-pc --recheck --debug /dev/sda
mkdir -p /boot/grub/locale
cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg
echo arch > /etc/hostname
passwd
reboot

Post Install
SSHD
pacman -S openssh
pacman -S net-tools
DAEMONS(sshd)
Rand mirror list
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
sed '/^#\S/ s|#||' -i /etc/pacman.d/mirrorlist.backup
rankmirrors -n 6 /etc/pacman.d/mirrorlist.backup > /etc/pacman.d/mirrorlist
pacman -Syy

NTPD
pacman -S ntp
DAEMONS(!hwclock ntpd)

Add user
adduser [audio,video,storage,power,optical,lp,scanner,games]

sudo
pacman -S sudo
visudo jejer ALL=(ALL) ALL

Audio [option]
gpasswd -a jejer audio
pacman -S alsa-utils
use alsamixer to unmute device and adjust volume
alsactl store
Add the alsa daemon to your DAEMONS array in /etc/rc.conf to automatically restore the mixer settings at boot

Video
gpasswd -a jejer video
pacman -S xorg-server xorg-xinit xorg-server-utils
pacman -S mesa
lspci | grep VGA
pacman -S [video-driver]

tigervnc
pacman -S tigervnc
vncserver -geometry 800x600

awesome
pacman -S awesome
pacman -S dbus
DAEMONS(dbus)

scim
pacman -S scim
pacman -S scim-pinyin

ttf-droid
pacman -S ttf-droid

cat xstartup
#!/bin/sh

#Avoid keyboard mis-mapping
export XKL_XMODMAP_DISABLE=1

#Support Chinese IME
export LC_CTYPE="zh_CN.UTF-8"

#Working with Clipboards
autocutsel -fork

#Start SCIM
scim -d

#start awesome
awesome

----------------------------------------------------
pacman -S apache php php-apache mysql
DAEMONS(mysqld)

cd /usr ; /usr/bin/mysqld_safe &
/usr/bin/mysqladmin -u root password 'new-password'

edit /etc/httpd/conf/httpd.conf and comment the following module:
LoadModule unique_id_module modules/mod_unique_id.so
uncomment line Include conf/extra/httpd-ssl.conf

download ssl.crt-->/etc/httpd/conf/server.crt
download decrypted.key-->/etc/httpd/conf/server.key

Add these lines in /etc/httpd/conf/httpd.conf:
Place this in the "LoadModule" list anywhere after LoadModule dir_module modules/mod_dir.so:
LoadModule php5_module modules/libphp5.so
Place this at the end of the "Include" list:
Include conf/extra/php5_module.conf
Make sure that the following line is uncommented in httpd.conf in the section/(after the line)<IfModule mime_module>:
TypesConfig conf/mime.types
Uncomment the following line in httpd.conf(optional):
MIMEMagicFile conf/magic
Add this line in /etc/httpd/conf/mime.types:
application/x-httpd-php5 php php5
extension=mysqli.so /*for phpmyadmin*/
extension=mysql.so /*for wordpress*/
extension=openssl.so /*for wordpress backup to dorpbox*/
info.php <?php phpinfo(); ?>

pacman -S phpmyadmin
https://wiki.archlinux.org/index.php/PhpMyAdmin

chown -R http:http /srv/http
----------------------------------
For the Unknown user uuidd error. Reinstall util-linux.
pacman -Syu util-linux
----------------------------------
[root@arch http]# cat .htaccess
RewriteEngine on

RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

没有评论:

发表评论