Ubuntu server 配置

自动启动无线:

  1. sudo -s
  2. # 生成一个 WPA/WPA2 网络配置文件
  3. sudo wpa_passphrase ESSID "PASSWORD">/etc/wpa_supplicant.conf
  4. # 使用vim编辑器打开网络配置文件
  5. sudo vim /etc/network/interfaces
  6. # 在配置文件最后添加几行(静态IP与有线网卡一样)
  7. # FOR DHCP
  8. auto wlan0
  9. iface wlan0 inet dhcp
  10. wpa-conf /etc/wpa_supplicant.conf
  11. # FOR STATIC
  12. auto wlan0
  13. iface wlan0 inet static
  14. address IP-ADDRESS
  15. netmask NETMASK
  16. network NET-ADDRESS
  17. gateway GATEWAY
  18. wpa-conf /etc/wpa_supplicant.conf

中文乱码解决:

  1. sudo vim /etc/default/locale
  2. #修改下面项
  3. LANG="en_US.UTF-8"
  4. LANGUAGE="en_US:en"

电源管理设置:

  1. sudo vim /etc/systemd/logind.conf
  2. #HandlePowerKey:按下电源键后的动作
  3. #HandleSleepKey:按下挂起键后的动作
  4. #HandleHibernateKey: 按下休眠键后的动作
  5. #HandleLidSwitch:合上笔记本盖后待机
  6. #动作可以是:
  7. #ignore|poweroff|reboot|halt|suspend|hibernate|hybrid-sleep|lock|kexec
  8. #重启服务生效
  9. sudo restart systemd-logind

无线网卡配置:

  1. #修改传输速率
  2. sudo iwconfig wlan0 rate 300M fixed
  3. #关闭电源管理
  4. sudo iwconfig wlan0 power off
  5. #重启
  6. sudo shutdown -r now
  7. #查看无线状态
  8. sudo iwconfig wlan0

Webmin安装:http://www.webmin.com/deb.html

磁盘smart检查支持:

  1. sudo apt-get install smartmontools

安装vsftpd服务:

  1. sudo apt-get install vsftpd
  2. #配置修改
  3. write_enable=YES # 允许写入
  4. xferlog_enable=NO # 关闭登录日志
  5. connect_from_port_20=NO # 不强制数据传输使用20端口
  6. chroot_local_user=YES # 限制只能访问登录的目录
  7. #配置添加
  8. allow_writeable_chroot=yes # 设置chroot后不添加此项可能无法登录
  9. local_root=xxxx # 强制登录目录,默认是用户目录
  10. listen_port=xxxxx# 监听端口
  11. #重启服务
  12. sudo service vsftpd restart

安装samba服务:

  1. #配置修改
  2. sudo vim /etc/samba/smb.conf
  3. [global]
  4. max log size =32
  5. usershare allow guests = yes
  6. security = share
  7. follow symlinks = no
  8. wide links = no
  9. use sendfile = yes
  10. read raw = yes
  11. write raw = yes
  12. getwd cache = yes
  13. large readwrite = yes
  14. aio write behind = true
  15. aio read size =16384
  16. aio write size =16384
  17. write cache size =2097152
  18. max xmit =65536
  19.  
  20. [froot]
  21. path =/home/alex/froot
  22. force user = alex
  23. guest account = alex
  24. public = yes
  25. writeable = yes
  26. browseable = yes
  27. delete readonly = yes
  28. create mode =0600
  29. directory mode =0700

权限速查:

  1. -rw-------(600)#只有所有者才有读和写的权限
  2. -rw-r--r--(644)#只有所有者才有读和写的权限,组群和其他人只有读的权限
  3. -rwx------(700)#只有所有者才有读,写,执行的权限
  4. -rwxr-xr-x (755)#只有所有者才有读,写,执行的权限,组群和其他人只有读和执行的权限
  5. -rwx--x--x (711)#只有所有者才有读,写,执行的权限,组群和其他人只有执行的权限
  6. -rw-rw-rw-(666)#每个人都有读写的权限
  7. -rwxrwxrwx (777)#每个人都有读写和执行的权限

系统清理:

  1. #删除系统不再使用的孤立软件包
  2. sudo apt-get autoremove
  3. #清理旧版本的软件缓存
  4. sudo apt-get autoclean
  5. #清理所有软件缓存
  6. sudo apt-get clean

删除内核:

  1. #查询旧的内核
  2. dpkg --get-selections|grep linux
  3. #删除
  4. sudo apt-get purge xxxxx

来自为知笔记(Wiz)

时间: 2024-08-11 09:41:39

Ubuntu server 配置的相关文章

Ubuntu server配置远程VNC服务

[email protected]:~# cat /etc/issue Ubuntu 12.04 LTS \n \l 需求:现在需要远程连接Ubuntu的图形界面,因为有一个程序是需要使用图形界面配置的. 默认情况下,Ubuntu server是没有图形界面的,使用Xmanager远程连接Ubuntu,连接完成后,本来想使用Xmanager自带的功能,来实现弹出一个图形界面的,但是不管怎么弹,该程序就是弹不出来,很纠结,用Xclock测试,是可以的.只能另行它法. 以前配置VNC,都是在RedH

Ubuntu Server配置PPTP VPN

服务器:Ubuntu Server 14.02 一.安装PPTP服务 1.下载并安装pptpd sudo apt-get install pptpd 2.配置vpn地址,编辑配置文件: sudo vim /etc/pptpd.conf 找到localip和remoteip,修改为自己需要的地址,例如: localip 192.168.10.1 remoteip 192.168.10.2-100 3.设置dns: sudo vim /etc/ppp/pptpd-options 将ms-dns修改为

Ubuntu Server配置网络和查看IP地址

文章来源地址:http://my.oschina.net/junn/blog/142983 Ubuntu Server的网络参数保存在文件 /etc/network/interfaces中,默认设置使用dhcp,内容如下: # The primary network interface auto eth0 iface eth0 inet dhcp 设置静态ip的方法如下: 1)编辑vi /etc/network/interfaces   1.1)将dhcp 一行屏蔽 # The primary

ubuntu server配置网络

我将virtualbox网络设置为桥接模式 ===================================== 检查网络配置 $ ifconfig 配置DHCP客户端 $ sudo vi /etc/network/interfaces 加入 iface eth0 inet dhcp 配置静态IP地址 $ sudo vi /etc/network/interfaces eth0配置如下: auto eth0 address 192.168.0.88 netmask 255.255.255.

Ubuntu Server 配置网络

------------------ Ubuntu 14.04   x86_64 ----------------- 设置静态IP:vi /etc/network/interfaces. 然后再编辑 auto loiface lo inet loopback # The primary network interfaceauto em1  ##第一块网卡的名称 , 可以通过ifconfig命令去查找iface em1 inet static  ## 设置为静态IP        address

xshell远程终端操作Ubuntu server安装LAMP环境之最详细笔记之二PHP开发环境配置

前言: 昨天学会了安装server,今天试着通过远程终端xshell来安装LAMP,搭配一下开发环境,也有集成环境可以一键安装使用,还是瞎折腾一下,手动一步一步搭建一下这个开发环境. 接上一篇:ubuntu server 14.04 LTS下搭建LAMP环境之最详细笔记之一U盘安装双系统本文原创博客地址:http://www.cnblogs.com/unofficial官网地址:www.pushself.com) 准备: 在windows系统上首先需要安装xhsell,具体下载地址可以搜一下,安

VirtualBox 内的 Ubuntu Server 虚拟机网络配置

环境: 宿主机:Windows 7,单网卡: 虚拟机:ubuntu-14.04.1-server-amd64: 宿主机上网是连接的路由器,IP 地址是通过 DHCP 服务自动获取的: 基本情况: Ubuntu Server 为全新安装.在安装完成之后发现,通过虚拟机可以 ping 通宿主机,但宿主机 ping 不通虚拟机.也尝试关闭防火墙,但没有作用,最后也发现跟防火墙没有关系. 正确配置: 首先设置虚拟机的网络,在 “Oracle VM VirtualBox 管理器”中选择新安装的 Ubunt

Ubuntu Server 12.04 静态IP简洁配置

PS:很长时间没使用Ubuntu了,刚才安装个Ubuntu Server 12.04做测试.Ubuntu的网络设置跟Redhat系是不一样的,配置IP时发现跟以前的Ubuntu桌面版本也有所不同,记录如下: 1.配置静态IP地址: # vim /etc/network/interfaces 原内容有如下4行:auto loiface lo inet loopback auto eth0iface eth0 inet dhcp 以上表示默认使用DHCP分配IP,修改为如下: auto loifac

Ubuntu Server 14.04 Apache2.4 虚拟主机配置 以及 模块重写的配置

环境:Ubuntu Server 14.04 Apache2.4 1.虚拟主机配置 在apache2.4中,虚拟主机的目录是通过/etc/apache2/sites-available中配置的,默认情况下,apache有一个默认的虚拟主机文件叫000-default.conf.我们将会复制000-default.conf文件内容到我们新的虚拟主机配置文件中. sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/si