Last active
October 11, 2015 10:47
-
-
Save laozhu/3847104 to your computer and use it in GitHub Desktop.
gentoo basic setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/conf.d/hostname | |
echo "HOSTNAME=\"mars\"" > /etc/conf.d/hostname | |
/etc/init.d/hostname restart | |
# /etc/resolv.conf | |
domain members.linode.com | |
search members.linode.com | |
nameserver 106.187.34.20 | |
nameserver 106.187.35.20 | |
nameserver 106.187.36.20 | |
nameserver 2400:8900::2 | |
nameserver 2400:8900::3 | |
options rotate | |
options timeout:1 | |
options attempts:42 | |
# /etc/localtime | |
rm /etc/localtime && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | |
# /etc/locale.gen | |
# /etc/env.d/02locale | |
LANG="en_US.UTF-8" | |
LC_COLLATE="C" | |
locale-gen | |
env-update && source /etc/profile | |
# add user | |
useradd -m -g users -G wheel -s /bin/bash laozhu | |
passwd laozhu | |
visudo | |
%wheel ALL=(ALL) ALL | |
# set ssh-keygen for user | |
ssh-keygen | |
cd .ssh | |
mv id_rsa.pub authorized_keys | |
scp laozhu@106.187.100.90:.ssh/id_rsa .ssh/ | |
vi /etc/ssh/sshd_config | |
PermitRootLogin no | |
sudo /etc/init.d/sshd restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment