Install sh как установить

от admin

Установка программ Ubuntu/Debian с помощью пакетного менеджера

Одна из самых сложных задач, возникающих в процессе установки Unix-программ — отслеживание зависимостей.

Любая более-менее сложная программа в своей работе использует возможности, предоставляемые другими модулями, системными библиотеками и т.д. Таким образом, появляется зависимость — если мы хотим установить программу «А», которая при работе использует библиотеки программы «Б», сначала необходимо установить программу «Б» (у которой, в свою очередь, могут быть свои зависимости). Таким образом, чем больше программ и зависимостей появляется на сервере, тем сложнее их отслеживать и управлять ими. Хорошая новость в том, что это можно делать с помощью пакетного менеджера APT (Advanced Packaging Tool).

Установка с помощью пакетного менеджера

Эволюция методов установки и управления программными пакетами со временем дошла до использования пакетных менеджеров, плотно интегрированных с репозиториями. В репозиториях содержатся упакованные файлы программ с данными об их зависимостях. После установки к операционной системе уже подключены системные репозитории: с их помощью можно обновлять ОС и устанавливать программные пакеты, которые были адаптированы и оптимизированы для работы с этой версией операционной системы.

Перед началом установки пакетов рекомендуется обновить данные о версиях и зависимостях в репозитории следующей командой:

sudo apt-get update

Скриншот №1. Обновление данных о версиях и зависимостях в репозитории

Если необходимо уточнить название пакета, который требуется установить — ищем в локальном кэше менеджер по ключевым словам, например, web server:

sudo apt-cache search web server

В результате получим большой перечень пакетов, где данное ключевое слово присутствует в описании:

Поиск по ключевым словам

Скриншот №2. Поиск по ключевым словам

Выбираем нужный нам пакет — в данном случае это apache2, и устанавливаем его:

sudo apt-get install apache2

Пакетный менеджер проверяет зависимости, версии, сравнивает их с уже установленными через apt-get пакетами, после чего выдает список необходимых для установки компонентов и запрашивает разрешение на продолжение операции:

Установка пакета

Скриншот №3. Установка пакета

Нажимаем y и дожидаемся окончания установки.

Часто используемые команды пакетного менеджера:

  • apt-get update — обновление информации о пакетах и зависимостях в подключенных репозиториях;
  • apt-get upgrade — обновление всех установленных пакетов до актуальной версии, имеющейся в репозитории;
  • apt-get install имя_пакета — установка пакета;
  • apt-get remove имя_пакета — удаление пакета;
  • apt-get download имя_пакета — скачать deb-пакет в локальную папку;
  • apt-cache search ключевые слова — поиск пакета по ключевым словам;
  • apt-cache show имя_пакета — показать информацию о пакете;
  • apt-cache depends имя_пакета — показать от каких компонентов зависит данный пакет;
  • apt-cache rdepends имя_пакета — показать какие компоненты зависят от пакета;
  • apt-mark hold имя_пакета — зафиксировать текущую версию пакета, прекратить обновление пакета;
  • apt-mark unhold имя_пакета — разрешить обновление пакета.

Установка через Debian package

Программные пакеты могут распространяться и не через репозитории. Например, они могут быть доступны на сайтах разработчиков. В таком случае, пакет можно скачать и воспользоваться утилитой dpkg (debian package) для установки. При использовании dpkg не происходит автоматическое отслеживание зависимостей и скачивание дополнительных пакетов. В случае нехватки каких-либо программ или библиотек установка завершится ошибкой с указанием списка отсутствующих пакетов. Их придется установить отдельно, например, через apt-get, если они присутствуют в подключенных репозиториях, либо скачивать с сайтов разработчиков и устанавливать в нужном порядке через dpkg.

Для примера скачаем из системного репозитория установочный пакет веб-сервера Nginx командой:

sudo apt-get download nginx

и попробуем установить через dpkg –i имя_файла.deb:

sudo dpkg –i ./nginx_1.14.0-0ubuntu1.6_all.deb

В результате система выдает ошибку с перечнем отсутствующих пакетов:

Ошибка с перечнем отсутствующих пакетов

Скриншот №4. Ошибка с перечнем отсутствующих пакетов

Как запустить install.sh в Linux через Терминал

6-08-2021, 05:40
Linux
472
0

/Deskop/rockhopper-0.2.b1-020. Замените rockhopper-0.2.b1-020 именем папки на рабочем столе. Нажмите ↵ Enter.

Install sh как установить

There are several ways of installing softwares in linux and they are described in many tutorials. this tutorial will cover most of the processes of installing softwares in a linux system.

Online installation:

#1. Through software manager(linux mint)/software center(ubuntu):

first open the terminal and run this command to get the latest version of the software:

sudo apt-get update

1. open software manager/center. it's in the menu.

2. search your desired software in the search box

3. if it's in the list then it will appear before you . if it's not in the list follow the instructions in the ppa installation section of this tutorial.

4. now double click on the desired software entry and then click "install".

5. it will be installed on your system as per your network connection speed.

#2. Through synaptic package manager:

if it is absent in your linux distribution then you will have to install it through software manager/center first.

to me it's the best way to install softwares in linux.

1. open synaptic package manager . click reload to get the latest version of the softwares.

2. search your desired software/s in the search box.

3. right click each software you want to install and mark them for installing. it will mark additional dependencies on it's own.

if your softwares not in the list follow the instructions in the ppa installation section of this tutorial.

4. after marking for installing, click apply

6. it will download and install the marked softwares.

if you have a list of softwares then save the file with the list, with .list extension (this file should contain the exact package name one at every line with an extra string "install" included after each package name preceding by an space/tab). then go to file->read markings and then brows to the file and open it. synaptic will mark the softwares in the list automatically.

#3. Through terminal:

if you know the exact name of the software then you can install it through terminal by simply entering the command:

sudo apt-get update (to get the latest version)

sudo apt-get install software-package-name

if it says "unable to locate package. " then follow the instructions in the ppa installation section of this tutorial.

#4. PPA installation:

if your software's not in the software list then it may come from private package archives (PPA's).

these are private development of softwares so use it at your own risk.

1. search google for the ppa address for your software. (like ppa for package-name)

2. then add it to the repository by entering this command in terminal:

sudo add-apt-repository ppa. whatever_it_is

3. then run this command (must)

sudo apt-get update

4. now your desired software is in the list. so you can follow one of the above processes (#1,#2,#3)

Offline installation:

say, you downloaded your desired softwares from some website. in this case if you don't trust the origin of the software then don't install it or install it at your own risk.

Your downloaded softwares may come as a .zip, tar.gz, tar.bz2, .deb, .rpm, .tgz, tar.xz or any other types of archives.

Читать:
Ouc exe что это за процесс

if you are in linux mint or in ubuntu or in a debian based OS try to download .deb packages because it's easier to install in debian based OS.

#5. installing .deb packages:

cd path_to_the_directory_that_contains_the_.deb_file

sudo dpkg -i filename.deb

through gdebi package manager:

if gdebi is not installed then you have to install it through one of the processes #1,#2,#3 (requires internet connection)

1. then double click on the .deb file or open the file with gdebi package manager and click install.

2. it will be istalled soon.

#6. installing .rpm packages:

rpm has to be installed in the system, otherwise follow one of the processes #1,#2,#3 to install rpm (requires internet connection)

cd path_to_the_directory_that_contains_the_.rpm_file

sudo rpm -i filename.rpm

#7. installing from archives(.zip tar.gz. etc):

these archives generally conatains the source of the package. each of them generally has a different approach to install. I will be discussing a common method which will supposedly work for all of them.

2. bison or bison++

As these archives contains the source, your system needs the required programming languages to compile and build the source. so the general requirement packages stated above may not be sufficient for you. in that case you have to install the required packages through one of the processes #1,#2,#3 (requires internet connection). you can know about the dependencies about your software in a readme file included in the archives.

1. open the archives with archive manager by double clicking it, then extract it.

cd path-to-the-extracted-folder

3. inside the extracted folder look carefully.

a. if you find a file named configure then :

./configure

make

sudo make install

if the first code fails to execute then run this code before above codes:

chmod +x configure

b. if you find a file named install.sh then

chmod +x install.sh

./install.sh or sudo ./install.sh (if it needs root permission)

or you can double click it and select run in terminal or simply run

N.B : sometimes there is a file, something like your_software_name.sh is found instead of install.sh. for this case you have to replace install.sh with the correct name in the previous codes.

c. if you find a file named install then

chmod +x install

./install or sudo ./install (if it needs root permission)

or you can double click it and select run in terminal or simply run

d. if you find a file named make (if there is no configure file) then

make

sudo make install

e. If you still can't find the required files

then it may be in a special folder (generally in a folder named 'bin'). move to this folder with cd command with appropriate path and then look again and follow the same process.

#8. pre installed archives:

some packages are archived as pre installed packages i.e you don't have to install them , you just need to extract them in a secure place and theres an executable file (name is generally same as the software name) in the extracted folder or in child folders like bin,build etc. you have to find it and make it executable.

Example: eclipse, adt bundle (android developing tool)

code to make executable:

chmod +x filename_with_exact_path

then you can run it with :

filename

or double clicking it and selecting run in terminal or run, whatever supports your software.

#9. installing .sh files:

some softwares come with a .sh file to install it

chmod +x filename.sh

./filename.sh or sudo ./filename.sh (if it needs root permission)

or double click it and select run in terminal or run, whatever supports your software.

#10. installing .run files:

some softwares come with a .run file to install it

chmod +x filename.run

./filename.run or sudo ./filename.run (if it needs root permission)

or double click it and select run in terminal or run, whatever supports your software.

Additional info about offline installation:

Often, softwares generally have a lot of dependencies. You need to download all of them, which sometimes can be very difficult and tiring. for this you can follow the instructions here which will save your time and effort.

for adding an entry in the menu for your newly installed software you can see my other tutorial:

W: The first three online methods are the safest way to install a software. For other methods you have to take risks of potential damage of your system or software dependencies.

Installing using the install.sh script

This section explains how to install using the install.sh script. This method is recommended for experienced UNIX administrators who are familiar with UNIX command-line installations. Otherwise, you should install by using the graphical user interface, which is described in Installing the Centrify DirectControl Agent for Mac.

To install using the install.sh command-line program:

Note:    Before launching the installer, be certain that Apple Directory Utility is closed. If it is open while running the installer, it causes the Centrify Directory Access plug-in to show the incorrect status, that is, it shows that the plug-in is disabled when in fact it is enabled.

    Log on with a valid user account.

Note:    You are not required to log on as the root user on, but you must know the password for the Administrator account to complete the installation.

Mount the CD-ROM device using the appropriate command for the local computer’s operating environment, if it is not automatically mounted.

Change to the appropriate directory on the CD or on the network where the DirectControl agent package is located. For example, change to the Agent_Mac directory.

Run the install.sh script to start the installation of Centrify on the local computer’s operating environment. For example:

Before beginning the installation, the install.sh script runs the ADCheck utility, which performs a set of operating system, network, and Active Directory checks to verify that the Mac computer meets the system requirements necessary to install the Centrify DirectControl Agent for Mac and join an Active Directory domain.

Review the results of the checks performed. If the target computer, DNS environment, and Active Directory configuration pass all checks with no warnings or errors, you should be able to perform a successful installation and join. If you receive errors or warnings, correct them before proceeding with the installation.

Follow the prompts displayed to select the services you want to install and the tasks you want to perform. For example, you can choose whether you want to join a domain or restart the local computer automatically at the conclusion of the installation.

When installation is complete, see Understanding the directory structure for a description of the directories and files installed for Centrify .

Похожие статьи