The new employer has become a regular employee and is on the right track. The blog has been off for 4 months and resumed updating. The small target of 12 articles set at the beginning of this year is likely to fail.

Preparatory work:

1. Install VMware Workstation Pro 16

You can permanently activate ZF3R0-FHED2-M80TY-8QYGC-NPKYf YF390-0HF8P-M81RQ-2DXQE-m2UT6 ZF71r-DMX85-08DQY-8YMNC-PPHV8 in batches using the following license keys

2. Install the Ubuntu Desktop version

Ubuntu version information: 18.04 or later is recommended. Note that it is a desktop version for easy human-computer interaction.cn.ubuntu.com/download


Start the installation and configuration:


Part one: Vmware configuring Ubuntu

If vmware is used, configure the CPU, memory, and hard disk size based on site requirements.

Matters needing attention:If authorization is required for Internet access from an independent IP address, configure the NAT mode for the VM network to allow the VM to access the Internet through the host network.

Part two: Ubuntu General configuration

1. Start the VM and Ubuntu

2. Right-click on the desktop and click Open in Terminal to Open the Terminal

3. Create the root account on the terminal

Run the “sudo passwd root” command, enter the password of the current user, and then enter the password of the root user. If “passwd: password updated successfully” is displayed, the root password is successfully created.

4. On the terminal, enter su, press Enter, and enter the root password created in Step 3 to switch to user root. Switch to root flag: command line starts with “root” and ends with “#”.

5. Run the gedit /etc/vim/vimrc.tiny command to edit /etc/vim/vimrc.tiny command to correct garbled arrow keys and invalid backspace keys when using the VI.

Set nocompatible set backspace=2

6. Configure a static IP address

Change the vmware network connection mode to bridge modeNext, change the network configuration for ubuntu. Method 1: Run the following command to edit /etc/netplan/01-network-manager-all.yaml and enter the following information:

Ethernets: ens33: DHcp4: no #ipv4 Disable DHCP with static mode DHcp6: no #ip6 disable DHCP optional: true addresses: [188.188.1.198/24] # IP address gateway4:188.188.0.1 #DNS server addresses: [202.96.128.86, 114.114.114.114]Copy the code

Save the Settings and exit. Then run “netplan apply” for the configuration to take effect.

Method 2: Open the Ubuntu Network Settings screen and manually set the IP addressNote: The subnet mask gateway DNS must be the same as the host.

7. Install basic tools such as Net-tools, SSH, and Samba

Apt-get install net-tools After the installation, you can run the ifconfig command

SSH – Use SSH to log in to ubuntu apt-get install openssh-server using a remote terminal (such as SecureCRT). Then run the /etc/init.d/ SSH restart command to restart the service.

Run the “smbpasswd -a dev02” command to create a samba password for user dev02. Conf or gedit /etc/samba/smb.conf to add the Samba share configuration information, such as share /home/dev02, to the end of the file

[dev02]
comment = share folder
browseable = yes
path = /home/dev02
create mask = 0755
directory mask = 0755
valid users = dev02
force user = dev02
force group = dev02
public = yes
available = yes
writable = yes
Copy the code

After editing, save the Settings and exit, and run the /etc/init.d/samba restart command to restart the Samba service. You can then share the dev02 directory to Windows by mapping network drives in Windows.

Part three: Configuring the GitLab service

1. Install GitLab-CE and dependent components

Run the following command as user root:

apt update apt-get install curl openssh-server ca-certificates postfix apt-get install wget wget https://mirrors.tuna.tsinghua.edu.cn/gitlab-ce/ubuntu/pool/focal/main/g/gitlab-ce/gitlab-ce_13.2.3-ce.0_amd64.deb DPKG -i gitlab - ce_13. 2.3 - ce. 0 _amd64. DebCopy the code

2. Edit/etc/gitlab/gitlab. Rb

Change the address to external_url ‘Gitlab.example.com ‘external_url instead ‘http://188.188.1.198’

3. The configuration gitlab

Run the “gitlab-ctl reconfigure” command and wait until the configuration is complete.

4. Start gitlab

Run the “gitlab-ctl start” command

5. Open the browser on your PC and type in the address.http://188.188.1.198 “.

If you open it for the first time, you need to create an administrator password for future management.