-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathArchlinux-Install.sh
244 lines (193 loc) · 6.37 KB
/
Archlinux-Install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
#wifi-menu
version=1.0
usuario=marcos
senha=12345
host=kleper1
temporario=temporario
sistema=/dev/vda1
home=/dev/vda2
function wifi(){
cat << EOF > /etc/netctl/wlp3s1-Edivan2
Description='Internet via Wifi do Edivan'
Interface=en3ss
Connection=wireless
Security=wpa
ESSID=Edivan2
IP=dhcp
Key=KLOpeNLibre10
EOF
sudo netctl enable wlp3s1-Edivan2 #statements
}
function rede-cabeada(){
cat << EOF > /etc/netctl/ens3
Description='Rede Cabeada do laboratorio'
Interface=ens33
Connection=ethernet
IP=dhcp
EOF
sudo netctl enable ens3
}
if [ $1 = -i ];then
cfdisk /dev/vda
mkfs.ext4 $sistema
mkfs.ext4 $home
mount $sistema /mnt
mkdir /mnt/home
mount $home /mnt/home
pacstrap /mnt base base-devel
genfstab -U /mnt >> /mnt/etc/fstab
wget -c -P /mnt https://raw.githubusercontent.com/ferreirarocha/arch-installer/master/Archlinux-Install.sh
arch-chroot /mnt bash Archlinux-Install.sh install
elif [ $1 = install ]; then
rede-cabeada
if [ $2 = wifi ];then
wifi
fi
rm /etc/localtime
ln -sf /usr/share/zoneinfo/America/Sao_Paulo /etc/localtime
hwclock --systohc --utc
sed s/\#pt_BR.UTF-8/pt_BR.UTF-8/g /etc/locale.gen > ds ; cp ds /etc/locale.gen
locale-gen
echo LANG=pt_BR.UTF-8 > /etc/locale.conf
export LANG=pt_BR.UTF-8
echo $host > /etc/hostname
pacman -S grub os-prober --noconfirm
grub-install /dev/vda
grub-mkconfig -o /boot/grub/grub.cfg
curl 'https://www.archlinux.org/mirrorlist/?country=BR&protocol=http&protocol=https&ip_version=4' > mirrorlist ; sed s/#Server/Server/g mirrorlist > /etc/pacman.d/mirrorlist
#nano /etc/pacman.conf
wget -P /etc/ https://raw.githubusercontent.com/ferreirarocha/arch-installer/master/pacman.conf
pacman -Syu
pacman -Ss
pacman -S xorg \
a52dec \
alsa-{utils,plugins,firmware} pulseaudio pulseaudio-{equalizer,alsa} \
archlinux-keyring \
faac \
faad2 \
flac \
git \
go \
jasper \
lame \
libdca \
libdv \
libmad \
libmpeg2 \
libtheora \
libvorbis \
libxv \
lxdm \
nautilus \
openssh \
p7zip \
pavucontrol \
rsync \
screenfetch \
tar \
ttf-dejavu \
ttf-droid \
unrar \
unzip \
vlc \
wavpack \
wget \
x264 \
xdg-user-dirs \
xf86-video-intel \
xfce4 \
xfce4-goodies \
xorg-server \
xorg-xinit \
xvidcore \
zsh --noconfirm
useradd $temporario -m ; echo $temporario:$senha | chpasswd
echo root:$senha | chpasswd
#usermod -aG libvirt $usuario
wget -O /etc/sudoers https://raw.githubusercontent.com/ferreirarocha/arch-installer/master/sudoers
gpasswd -a $usuario sys
gpasswd -a $usuario lp
gpasswd -a $usuario network
gpasswd -a $usuario optical
gpasswd -a $usuario video
gpasswd -a $usuario storage
gpasswd -a $usuario scanner
gpasswd -a $usuario power
gpasswd -a $usuario wheel
gpasswd -a $temporario wheel
rm /home/$temporario/.config/yay/config.json
mkdir -m 777 pkg
cd /pkg
sudo -u $temporario -H sh -c "git clone https://aur.archlinux.org/yay.git; cd yay/ ; makepkg -si --noconfirm"
su -c " yay -S albert --noconfirm" $temporario
su -c " yay -S atom --noconfirm" $temporario
su -c " yay -S bind-tools --noconfirm" $temporario
su -c " yay -S chrony --noconfirm" $temporario
su -c " yay -S exfat-utils --noconfirm" $temporario
su -c " yay -S file-roller --noconfirm" $temporario
su -c " yay -S gimp --noconfirm" $temporario
su -c " yay -S hunspell-pt-br --noconfirm" $temporario
su -c " yay -S inkscape --noconfirm" $temporario
su -c " yay -S ksuperkey --noconfirm" $temporario
su -c " yay -S libreoffice-dev-bin --noconfirm" $temporario
su -c " yay -S megasync --noconfirm" $temporario
su -c " yay -S mtnm --noconfirm" $temporario
su -c " yay -S telegram-desktop-bin --noconfirm" $temporario
su -c " yay -S tilix --noconfirm" $temporario
su -c " yay -S typora --noconfirm" $temporario
su -c " yay -S dropbox --noconfirm" $temporario
su -c " yay -S google-chrome --noconfirm" $temporario
su -c " yay -S firefox --noconfirm" $temporario
su -c " yay -S xfce4-dockbarx-plugin-git --noconfirm" $temporario
su -c " yay -S ntfs-3g --noconfirm" $temporario
su -c " yay -S ocs-url --noconfirm" $temporario
su -c " yay -S xpdf --noconfirm" $temporario
su -c " yay -S gthumb --noconfirm" $temporario
su -c " yay -S gparted --noconfirm" $temporario
su -c " yay -S gitkraken --noconfirm" $temporario
su -c " yay -S sigil --noconfirm" $temporario
su -c " yay -S gst-libav --noconfirm" $temporario
su -c " yay -S furiusisomount --noconfirm" $temporario
su -c " yay -S kdenlive \
frei0r-plugins \
oxygen-icons \
breeze \
breeze-gtk \
dvdauthor \
kde-gtk-config
--noconfirm" $temporario
rm /etc/skel/.*
git clone https://github.com/ferreirarocha/myconf.git /etc/skel/
rm /etc/skel/LICENSE
rm /etc/skel/README.md
rm /etc/skel/.git
useradd $usuario -m ; echo $usuario:$senha | chpasswd
sed -i s/usuario/$usuario/g /home/$usuario/.zshrc
chown $usuario. -Rvf /home/$usuario/*
chown $usuario. -Rvf /home/$usuario/.*
pacman -R virtualbox-host-dkms \
virtualbox-sdk \
virtualbox --noconfirm
pacman -R xfce4-terminal --noconfirm
pacman -R ristretto --noconfirm
pacman -R thunar-archive-plugin --noconfirm
pacman -R thunar-volman --noconfirm
pacman -R thunar-media-tags-plugin --noconfirm
pacman -R thunar --noconfirm
sudo sed -i /etc/lxdm/lxdm.conf \
-e 's;^# session=/usr/bin/startlxde;session=/usr/bin/startxfce4;g'
xdg-user-dirs-update
chsh -s /bin/zsh $usuario
userdel -r -f $temporario
sed -i s/%wheel/\#%wheel/g /etc/sudoers
# Instalando o KAS Key Access ssh
wget bit.ly/install-kas ; bash install-kas --install
systemctl enable sshd
sudo systemctl enable lxdm
exit
else
echo "dd"
fi
umount /mnt/home
umount /mnt
echo -e "Arch Linux instalado reinicie o sistema"