抱歉,您的浏览器无法访问本站

本页面需要浏览器支持(启用)JavaScript


了解详情 >

换源

https://mirrors.tuna.tsinghua.edu.cn/help/alpine/

1
2
sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories

更改时区

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
LXC-network:~# setup-timezone 
Which timezone are you in? ('?' for list) [UTC] ?
Africa/ Atlantic/ Canada/ EST5EDT Factory GMT-0 Iceland Japan MST7MDT PRC ROC US/ Zulu
America/ Australia/ Chile/ Egypt GB GMT0 Indian/ Kwajalein Mexico/ PST8PDT ROK UTC posixrules
Antarctica/ Brazil/ Cuba Eire GB-Eire Greenwich Iran Libya NZ Pacific/ Singapore Universal right/
Arctic/ CET EET Etc/ GMT HST Israel MET NZ-CHAT Poland Turkey W-SU
Asia/ CST6CDT EST Europe/ GMT+0 Hongkong Jamaica MST Navajo Portugal UCT WET
Which timezone are you in? ('?' for list) [UTC] Asia/
What sub-timezone of 'Asia/' are you in? ('?' for list) ?
Aden Atyrau Brunei Damascus Hebron Jerusalem Kolkata Makassar Phnom_Penh Saigon Tashkent Ujung_Pandang Yangon
Almaty Baghdad Calcutta Dhaka Ho_Chi_Minh Kabul Krasnoyarsk Manila Pontianak Sakhalin Tbilisi Ulaanbaatar Yekaterinburg
Amman Bahrain Chita Dili Hong_Kong Kamchatka Kuala_Lumpur Muscat Pyongyang Samarkand Tehran Ulan_Bator Yerevan
Anadyr Baku Choibalsan Dubai Hovd Karachi Kuching Nicosia Qatar Seoul Tel_Aviv Urumqi
Aqtau Bangkok Chongqing Dushanbe Irkutsk Kashgar Kuwait Novokuznetsk Qostanay Shanghai Thimbu Ust-Nera
Aqtobe Barnaul Chungking Famagusta Istanbul Kathmandu Macao Novosibirsk Qyzylorda Singapore Thimphu Vientiane
Ashgabat Beirut Colombo Gaza Jakarta Katmandu Macau Omsk Rangoon Srednekolymsk Tokyo Vladivostok
Ashkhabad Bishkek Dacca Harbin Jayapura Khandyga Magadan Oral Riyadh Taipei Tomsk Yakutsk
What sub-timezone of 'Asia/' are you in? ('?' for list) Shanghai


安装ssh服务器

1
setup-sshd
1
2
3
4
5
6
7
8
LXC-network:~# setup-sshd
Which ssh server? ('openssh', 'dropbear' or 'none') [openssh] openssh
Allow root ssh login? ('?' for help) [prohibit-password] yes
Enter ssh key or URL for root (or 'none') [none]
* service sshd added to runlevel default
* Caching service dependencies ... [ ok ]
ssh-keygen: generating new host keys: RSA
* Starting sshd ... [ ok ]

安装nginx

1
apk add nginx

如果遇到nginx报错nginx: [emerg] open() "/run/nginx/nginx.pid" failed (2: No such file or directory)
需要手动创建文件夹:

1
mkdir /run/nginx

参考来源:https://superuser.com/questions/1306656/cant-run-nginx-in-alpine-linux-docker

评论