What to do after installing Ubuntu

Keywords: sudo Windows Oracle Java

JDK

Installation using PPA source mode:
  1. Add PPA
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
  1. Install oracle-java-installer
// JDK7
sudo apt-get install oracle-java7-installer

// JDK8
sudo apt-get install oracle-java8-installer

Installer will prompt you to agree to oracle's terms of service and select ok

Then select yes.

If you're lazy, you don't want to click manually. You can also add the following command and agree to the terms by default:

// JDK7 Default Options
echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections


// JDK8 Default Options
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections

Next will be waiting (as per personal network)

If you download installer slowly because of firewall or other reasons, you can interrupt the operation. Then download the tar.gz package of the corresponding jdk and put it in:

/var/cache/oracle-jdk7-installer             (jdk7) 

/var/cache/oracle-jdk8-installer              (jdk8) 

Next, installer. installer will default to the tar.gz package you downloaded

  1. Setting the system default jdk
// JDK7
sudo update-java-alternatives -s java-7-oracle

// JDK8
sudo update-java-alternatives -s java-8-oracle

If both jdk7 and jdk8 are installed, the switch between them can be achieved by:

// Switching jdk8 to jdk7
sudo update-java-alternatives -s java-7-oracle

// Switching jdk7 to jdk8
sudo update-java-alternatives -s java-8-oracle
  1. Test whether the JDK is installed successfully:
java -version

javac -version

Wine

install
  1. If your computer is 64-bit, turn on 32-bit architecture
$ sudo dpkg --add-architecture i386 
  1. Add PPA
$ sudo add-apt-repository ppa:wine/wine-builds
  1. Update local packages
$ sudo apt-get update
  1. install
// Development version

$ sudo apt-get install --install-recommends winehq-devel

// Staging version
$ sudo apt-get install --install-recommends winehq-staging
Random code
  1. Initial settings: Run winecfg and set the simulated Windows system to Windows XP or Windows 2000.
  2. Prepare fonts:

In order to make Windows applications look more beautiful, you need fonts under Windows.
Because I have copied simsun.ttc to / usr/share/fonts/windows/
It's in the catalogue. So I just need to ~/. wine/drive_c/windows/fonts / directory for
simsun.ttc creates a symbolic connection:

$ cd ~/.wine/drive_c/windows/fonts
$ ln -s /usr/share/fonts/windows/simsun.ttc simsun.ttc
$ ln -s /usr/share/fonts/windows/simsun.ttc simfang.ttc

Creating a simfang.ttc is the default simfang.ttc font for many Windows applications.

  1. Modify ~/.wine/system.reg

After installing the font, you also need to modify Wine's registry settings to specify font-related settings:

gedit ~/.wine/system.reg

(Be sure to use gedit or other support for gb2312/utf8
The coded editor modifies these files, otherwise the Chinese in the files may be scrambled.

Search: LogPixels

The line found should be: [System\\ CurrentControlSet\ Hardware
Profiles\\Current\\Software\\Fonts]

Among them:

"LogPixels"=dword:00000060

Changed to:

"LogPixels"=dword:00000070

Search: FontSubstitutes

The line found should be: [Software\\ Microsoft\ Windows
NT\\CurrentVersion\\FontSubstitutes]

Among them:

"MS Shell Dlg"="Tahoma"
"MS Shell Dlg 2″="Tahoma"

Changed to:

"MS Shell Dlg"="SimSun"
"MS Shell Dlg 2″="SimSun"
  1. Modify ~/.wine/drive_c/windows/win.ini
gedit ~/.wine/drive_c/windows/win.ini

At the end of the document, add:

[Desktop]
menufontsize=13
messagefontsize=13
statusfontsize=13
IconTitleSize=13
  1. The most critical step, which is not mentioned in many articles on the Internet, is to save the following code as zh.reg, and then the terminal executes regedit.
    zh.reg. Copy simsun.ttc from Fonts in Windows directory to / home/user/.wine/drive_c/windows/fonts.
REGEDIT4
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows
NT\CurrentVersion\FontSubstitutes]
"Arial"="simsun"
"Arial CE,238"="simsun"
"Arial CYR,204"="simsun"
"Arial Greek,161"="simsun"
"Arial TUR,162"="simsun"
"Courier New"="simsun"
"Courier New CE,238"="simsun"
"Courier New CYR,204"="simsun"
"Courier New Greek,161"="simsun"
"Courier New TUR,162"="simsun"
"FixedSys"="simsun"
"Helv"="simsun"
"Helvetica"="simsun"
"MS Sans Serif"="simsun"
"MS Shell Dlg"="simsun"
"MS Shell Dlg 2"="simsun"
"System"="simsun"
"Tahoma"="simsun"
"Times"="simsun"
"Times New Roman CE,238"="simsun"
"Times New Roman CYR,204"="simsun"
"Times New Roman Greek,161"="simsun"
"Times New Roman TUR,162"="simsun"
"Tms Rmn"="simsun"
Frequently used commands
winecfg             // wine settings
wine Program path       // Use wine to Open windows Programs
wine taskmgr        // Task Manager
wine uninstaller    // Uninstall software
wine regedit        // registry
wine notepad        // Notepad
wineboot            // Restart wine
QQ login box cannot be entered
  • Open wine Settings
$ winecfg
  • In the column of function library, add riched20.dll and riched30.dll to replace the new function library.

Shadowsocks client

command line
// Install PIP
$ apt-get update
$ apt-get install python-pip
$ python-setuptools m2crypto

// Install shadowsocks
$ pip install shadowsocks

view help

sslocal --help

start-up

sslocal -c config.json

Configuration file content

{
    "server":"11.22.33.44",
    "server_port":50003,
    "local_port":1080,
    "password":"123456",
    "timeout":600,
    "method":"aes-256-cfb"
}
  • server Your server IP
  • Server_port Your Server Port
  • local_port local port, default 1080
  • Passwd SS Server Set Password
  • The timeout timeout settings are the same as those on the server side
  • The method encryption method is the same as the server side.

LNMP

sudo wget -c http://soft.vpser.net/lnmp/lnmp1.3-full.tar.gz && tar zxf lnmp1.3-full.tar.gz && cd lnmp1.3-full && ./install.sh lnmp

Terminator multi-window terminal

sudo apt-get install terminator

Xdebug

  1. Compile Xdebug
$ tar -zvxf xdebug-2.2.3.tgz
$ cd xdebug-2.2.3
$ phpize
$ ./configrue --with-php-config=/usr/local/php/bin/php-config
$ make
$ make test
$ make install
  1. Modify php.ini
zend_extension= "/usr/local/php/extension/xdebug.so"

xdebug.default_enable = On
xdebug.show_exception_trace = On
xdebug.show_local_vars = 1
xdebug.max_nesting_level = 50
xdebug.var_display_max_depth = 6
xdebug.dump_once = On
xdebug.dump_globals = On
xdebug.dump_undefined = On
xdebug.dump.REQUEST = *
xdebug.cli_color = 2

MongoDB

  1. Public keys used to import package management systems
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
  1. Create A / etc/apt/sources.list.d/mongodb-enterprise.list file
$ echo "deb [ arch=amd64,arm64,ppc64el,s390x ] http://repo.mongodb.com/apt/ubuntu xenial/mongodb-enterprise/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
  1. Update local package data
$ sudo apt-get update
  1. Install the MongoDB Enterprise package
$ sudo apt-get install mongodb-enterprise

Eclipse

  1. Eclipse Download Eclipse Installer
  2. Select the appropriate version to install in Eclipse Installer

Posted by algarve4me on Fri, 05 Apr 2019 20:45:31 -0700