My status

My backup memory

Thứ Sáu, ngày 16 tháng 3 năm 2012

Summary of Ubuntu Linux

FTP Server Installation

sudo apt-get install vsftpd

Anonymous FTP Configuration

By default vsftpd is not configured to only allow anonymous download. If you wish to enable anonymous download edit /etc/vsftpd.conf changing:
anonymous_enable=Yes During installation a ftp user is created with a home directory of /srv/ftp. This is the default FTP directory.
If you wish to change this location, to /srv/files/ftp for example, simply create a directory in another location and change the ftp user's home directory:
sudo mkdir /srv/files/ftp sudo usermod -d /srv/files/ftp ftp

User Authenticated FTP Configuration

By default vsftpd is configured to authenticate system users and allow them to download files. If you want users to be able to upload files, edit /etc/vsftpd.conf:
write_enable=YES 
 
Now restart vsftpd:sudo restart vsftpd

Nguồn: https://help.ubuntu.com/10.10/serverguide/C/ftp-server.html
-------------------------------
Install desktop Environment
First you nee to make sure you have enabled Universe and multiverse repositories in /etc/apt/sources.list file once you have enable you need to use the following command to install GUI
sudo apt-get update
sudo apt-get install ubuntu-desktop
The above command will install GNOME desktop
If you wan to install a graphical desktop manager without some of the desktop addons like Evolution and OpenOffice, but continue to use the server flavor kernel use the following command
sudo aptitude install --without-recommends ubuntu-desktop
If you want to install light weight desktop install xfce using the following command
sudo apt-get install xubuntu-desktop
If you want to install KDE desktop use the following command
sudo apt-get install kubuntu-desktop
Chu y: sau khi test chi co ubuntu-desktop (ban full) va kubuntu la chay dc

Link: http://www.ubuntugeek.com/install-gui-in-ubuntu-server.html
--------------------------

Configuring Static ip address in Ubuntu server

If you want to install vim editor use the following command

    sudo apt-get install vim-full

Ubuntu installer has configured our system to get its network settings via DHCP, Now we will change that to a static IP address for this you need to edit

Edit /etc/network/interfaces and enter your ip address details (in this example setup I will use the IP address 172.19.0.10):

    sudo vi /etc/network/interfaces
 
nếu dùng kubuntu
    sudo kate /etc/network/interfaces

and enter the following save the file and exit (In vi, ESC, then ZZ to save and exit)

# The primary network interface

auto eth0
iface eth0 inet static
address 172.19.0.10
netmask 255.255.255.0
#network 172.19.0.0
#broadcast 172.19.0.255
gateway 172.19.0.1

Now you need to restart your network services using the following command

    sudo /etc/init.d/networking restart

You need to setup manually DNS servers in resolv.conf file when you are not using DHCP.

    sudo vi /etc/resolv.conf

You need to add look something like this

search domain.com
nameserver xxx.xxx.xxx.xxx
 
Lệnh kiểm tra 
ifconfig
 
Thay đổi host, workgroup
 
sudo gedit /etc/hostname
Sửa hosts file
sudo gedit /etc/hosts
 
Change your system workgroup name, run the command below to edit samba smb.conf file. 
sudo gedit /etc/samba/smb.conf
 
Lưu ý: thay gedit bằng hoặc vi, kate... nếu không dùng ubuntu desktop
 

------------------

Install VMware Tools for Ubuntu
Link: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1022525

Ubuntu Server with only a Command Line Interface

    Go to Virtual Machine > Install VMware Tools (or VM > Install VMware Tools).

    Note: If you are running the light vesion of Fusion, or a version of Workstation without VMware Tools, or VMware Player, you are prompted to download the Tools before they can be installed. Click Download Now to begin the download.


    In the Ubuntu guest, run these commands:

        sudo mkdir /mnt/cdrom

        When prompted for a password, enter your Ubuntu admin user password.

        Note: For security reasons, the typed password is not displayed. You do not need to enter your password again for the next five minutes.

        sudo mount /dev/cdrom /mnt/cdrom

        The file name of the VMware Tools bundle varies depending on your version of the VMware product. Run this command to find the exact name:

        ls /mnt/cdrom

        tar xzvf /mnt/cdrom/VMwareTools-.tar.gz -C /tmp/

        Note:  is the version discovered in the previous step.

        cd /tmp/vmware-tools-distrib/

        sudo ./vmware-install.pl -d

        Note: The -d switch assumes that you want to accept the defaults. If you do not use -d, press Return to accept each default or supply your own answers.

    Run this command to reboot the virtual machine after the installation completes:

    sudo reboot 
------------
Reset MySQL root password 
In this tip we will see how to change or reset the MySQL root password 
under Ubuntu. This tip is tested under Ubuntu 11.10 and may work for 
other older versions of Ubuntu (11.04/10.10/10.04 or older).

This tutorial is also useful for users that forget to assign a MySQL 
root password during the installation of the MySQL client. If no 
password assigned, you may get this error when trying to login to the 
MySQL server:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

Getting Started
1. Open the terminal (Ctrl+Alt+T) and stop the MySQL server with this command:
sudo /etc/init.d/mysql stop
2. Run now this command to start the MySQL configuration:
sudo mysqld --skip-grant-tables &
3. Login now to the MySQL server as root:
mysql -u root mysql
4. Change now your MySQL root password with this command:
UPDATE user SET Password=PASSWORD('NEWPASSWORD') WHERE User='root'; FLUSH PRIVILEGES; exit;
Replace NEWPASSWORD with any password of your choice.
You can now login smoothly to the MySQL server with the assigned password. 
 
Link: https://help.ubuntu.com/community/MysqlPasswordReset 
 
------------------------------- 
Nếu đang dùng ubuntu desktop -> Ctrl – Alt – T to open Terminal.
Hướng dẫn sử  dụn vi tại đây http://www.cs.colostate.edu/helpdocs/vi.html 

 

Không có nhận xét nào:

Đăng nhận xét