├── DHCP.conf
├── LICENSE
├── README.md
├── centos.repo
├── developing.sh
├── dind.sh
├── fast.md
├── new_nginx.conf
├── nginx.sh
├── odoo-server
├── odoo.conf
├── odoo.service
├── odoo12_pro.sh
├── odoo14_dev.sh
├── odoo14_dev20.sh
├── odoo15_2204.sh
├── odoo15_pro.sh
├── odoo17_pro.sh
├── odoo_dev.sh
├── odoo_dev_2204.sh
├── odoo_nginx.conf
├── odoo_pro.sh
├── odoo_pro18.sh
├── odoo_pro20.sh
├── odoo_redhat.sh
├── pgdg.list
├── pgdg20.list
├── redhat.sh
├── requirements.txt
├── webmin.list
└── zsh-shell.md
/DHCP.conf:
--------------------------------------------------------------------------------
1 | auto lo eth0
2 | iface lo inet loopback
3 | iface eth0 inet dhcp
4 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 | {one line to give the program's name and a brief idea of what it does.}
635 | Copyright (C) {year} {name of author}
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | {project} Copyright (C) {year} {fullname}
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # OdooScript
2 | Odoo dependence installation script for Ubuntu 14.04 , 15.04 ,16.04 ,20.04 , 22.04 ,*24.04(universal)
3 | make your envirument ready for all kind of odoo with pycharm IDE
4 | after run the script u have to download odoo manully
5 |
6 | ssh-keygen -t ed25519 -C "your_email@example.com"
7 |
8 | ### Copy this script and run it on your terminal
9 |
10 | ./odoo-bin -w a -s -c ../odoo.conf --stop-after-init
11 |
12 | ./odoo-bin -w a -s -c /etc/odoo/odoo.conf --stop-after-init
13 |
14 | export LC_ALL="en_US.UTF-8"
15 | export LC_CTYPE="en_US.UTF-8"
16 | sudo dpkg-reconfigure locales
17 |
18 | ########################################################################
19 | adduser odoo
20 |
21 | ########################################################################
22 |
23 | apt-get update
24 | apt-get install software-properties-common
25 | add-apt-repository ppa:certbot/certbot
26 | apt-get update
27 | apt-get install python-certbot-apache
28 | sudo certbot --apache
29 | #######################################################################
30 |
31 | wget https://raw.githubusercontent.com/mah007/OdooScript/12.0/nginx.sh
32 | bash nginx.sh
33 |
34 | apt-get update
35 | apt-get install software-properties-common -y
36 | add-apt-repository universe
37 | add-apt-repository ppa:certbot/certbot
38 | apt-get update
39 | apt-get install certbot python-certbot-nginx -y
40 |
41 | sudo certbot --nginx
42 |
43 |
44 |
45 | #######################################################################
46 |
47 | nano /etc/apt/sources.list.d/pgdg.list
48 | deb deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main
49 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
50 |
51 | sudo apt-get update
52 |
53 | ########################################################################
54 |
55 | sudo su - postgres -c "createuser -s odoo" 2> /dev/null || true
56 | wget https://raw.githubusercontent.com/mah007/OdooScript/master/odoo_pro.sh
57 | sudo /bin/sh odoo_pro.sh
58 |
59 | #
60 |
61 | wget http://software.virtualmin.com/gpl/scripts/install.sh
62 | sh /root/install.sh -b LEMP
63 |
64 | ********************PG UTF*********************
65 |
66 | sudo su postgres
67 | psql
68 | update pg_database set datistemplate=false where datname='template1';
69 | drop database Template1;
70 | create database template1 with owner=postgres encoding='UTF-8'
71 | lc_collate='en_US.utf8' lc_ctype='en_US.utf8' template template0;
72 | update pg_database set datistemplate=true where datname='template1';
73 |
--------------------------------------------------------------------------------
/centos.repo:
--------------------------------------------------------------------------------
1 | [baseos]
2 | name=CentOS Stream $releasever - BaseOS
3 | mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=BaseOS&infra=$infra
4 | baseurl=https://vault.centos.org/centos/8/BaseOS/x86_64/os/
5 | #baseurl=http://mirror.centos.org/$contentdir/$stream/BaseOS/$basearch/os/
6 | gpgcheck=0
7 | enabled=1
8 | #gpgkey=/etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
9 | gpgkey=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL
10 |
11 | [appstream]
12 | name=CentOS Stream $releasever - AppStream
13 | mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=AppStream&infra=$infra
14 | #baseurl=http://mirror.centos.org/$contentdir/$stream/AppStream/$basearch/os/
15 | baseurl=https://vault.centos.org/centos/8/AppStream/x86_64/os/
16 | gpgcheck=0
17 | enabled=1
18 | #gpgkey=/etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
19 | gpgkey=https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL
20 | #/etc/yum.repos.d/centos.repo
21 |
--------------------------------------------------------------------------------
/developing.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # to run the script "sudo /bin/sh odoo_pro.sh"
3 | ################################################################################
4 | # Script for preparing Odoo production server platform on Ubuntu 14.04, 15.04 and 16.04 (could be used for other version too)
5 | # Author: Mahmoud Abdel Latif
6 | # Mobile No: +201002688172
7 | # Email: Mah008@me.com
8 | # Website: http://www.mah007.com
9 | #-------------------------------------------------------------------------------
10 | # This script will make ur server ready for installing ODOO from 8 to 11
11 | #-------------------------------------------------------------------------------
12 | # Make a new file:
13 | # sudo nano odoo_pro.sh
14 | # Place this content in it and then make the file executable:
15 | # sudo chmod +x odoo_pro.sh
16 | # git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
17 | # Execute the script to install Odoo:
18 | # ./odoo-developing
19 | ################################################################################
20 |
21 | ##fixed parameters
22 | #instead of odoo use ur user name .EG OE_USER="mahmoud"
23 | OE_USER="mahmoud"
24 | #The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
25 | #Set to true if you want to install it, false if you don't need it or have it already installed.
26 | INSTALL_WKHTMLTOPDF="True"
27 |
28 | # Set this to True if you want to install Odoo 9 10 11 Enterprise! ( you can use enterprise normaly too ;) )
29 | IS_ENTERPRISE="True"
30 |
31 | ##
32 | ### WKHTMLTOPDF download links
33 | ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
34 | ## in order to have correct version of wkhtmltox installed, for a danger note refer to
35 | ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
36 | WKHTMLTOX_X64=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
37 | WKHTMLTOX_X32=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_i386.deb
38 | #--------------------------------------------------
39 | # Update Server
40 | #--------------------------------------------------
41 | echo -e "\n---- Update Server ----"
42 | sudo apt-get update
43 | sudo apt-get upgrade -y
44 | apt install -y zip
45 | echo "----------------------------localization-------------------------------"
46 |
47 | export LC_ALL="en_US.UTF-8"
48 | export LC_CTYPE="en_US.UTF-8"
49 | sudo dpkg-reconfigure locales
50 |
51 | #--------------------------------------------------
52 | # Install PostgreSQL Server
53 | #--------------------------------------------------
54 | wget https://raw.githubusercontent.com/mah007/OdooScript/12.0/pgdg.list
55 | cp pgdg.list /etc/apt/sources.list.d
56 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
57 | sudo apt-get update
58 |
59 | echo -e "\n---- Install PostgreSQL Server ----"
60 | sudo apt-get install postgresql-12 postgresql-server-dev-12 -y
61 |
62 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
63 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
64 |
65 | #--------------------------------------------------
66 | # Install Dependencies
67 | #--------------------------------------------------
68 | echo -e "\n---- Install tool packages ----"
69 | sudo apt-get install wget nano subversion git bzr bzrtools python-pip python3-pip gdebi-core -y pysassc
70 |
71 | echo -e "\n---- Install python packages ----"
72 | sudo apt-get install python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil python-gpgme python-launchpadlib build-essential python-all-dev python-setuptools python-imaging python-suds python-xlsxwriter python-wheel -y
73 |
74 | echo -e "\n---- Install python libraries ----"
75 | sudo pip install gdata psycogreen
76 | # This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04
77 | sudo -H pip install suds
78 |
79 | echo -e "\n--- Install other required packages"
80 | sudo apt-get install node-clean-css -y
81 | sudo apt-get install node-less -y
82 | sudo apt-get install python-gevent -y
83 | apt-get install libwww-perl -y
84 | #sudo apt install ifupdown -y
85 |
86 |
87 | #--------------------------------------------------
88 | # Install Wkhtmltopdf if needed
89 | #--------------------------------------------------
90 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
91 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 9 ----"
92 | #pick up correct one from x64 & x32 versions:
93 | if [ "`getconf LONG_BIT`" == "64" ];then
94 | _url=$WKHTMLTOX_X64
95 | else
96 | _url=$WKHTMLTOX_X32
97 | fi
98 | sudo wget $_url
99 | sudo gdebi --n `basename $_url`
100 | sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
101 | sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
102 | else
103 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
104 | fi
105 |
106 |
107 |
108 |
109 | if [ $IS_ENTERPRISE = "True" ]; then
110 | # Odoo Enterprise install!
111 |
112 | echo -e "\n---- Installing Enterprise specific libraries ----"
113 | sudo apt-get install nodejs npm -y
114 | sudo npm install -g less
115 | sudo npm install -g less-plugin-clean-css
116 | sudo npm install -g rtlcss
117 | else
118 | echo -e "\n---- every thing is ready ----"
119 |
120 | fi
121 | sudo ln -s /usr/bin/nodejs /usr/bin/node
122 |
123 | sudo apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev python3-dev
124 | sudo easy_install greenlet
125 | sudo easy_install gevent
126 | sudo apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev python3-pip python3-wheel python3-setuptools
127 | sudo -H pip install -r https://raw.githubusercontent.com/odoo/odoo/10.0/requirements.txt
128 | sudo apt install -y python3-asn1crypto
129 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-vatnumber python3-werkzeug python3-xlsxwriter python3-yaml
130 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/11.0/requirements.txt
131 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/12.0/requirements.txt
132 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/13.0/requirements.txt
133 | sudo -H pip3 install -r https://raw.githubusercontent.com/it-projects-llc/odoo-saas-tools/12.0/requirements.txt
134 | sudo -H pip3 install phonenumbers
135 | echo "---------------------------odoo directory--------------------------------"
136 | #mkdir /odoo
137 | #mkdir /etc/odoo
138 | #mkdir /var/log/odoo
139 | #touch /etc/odoo/odoo.conf
140 | #touch /var/log/odoo/odoo-server.log
141 | #chown odoo:odoo /var/log/odoo/odoo-server.log
142 | #chown odoo:odoo /etc/odoo/odoo.conf
143 | #chown -R odoo:odoo /odoo
144 | echo "-------------------------------odoo service----------------------------"
145 | #wget https://raw.githubusercontent.com/mah007/OdooScript/12.0/odoo.service
146 | #cp odoo.service /etc/systemd/system
147 | #sudo systemctl daemon-reload
148 | #sudo systemctl enable odoo
149 | #sudo systemctl start odoo
150 | #echo "----------------------------NGINX-------------------------------"
151 | #wget https://raw.githubusercontent.com/mah007/OdooScript/12.0/nginx.sh
152 | #bash nginx.sh
153 | echo "---------------------------webmin--------------------------------"
154 | #apt-get install -y perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
155 | #wget http://prdownloads.sourceforge.net/webadmin/webmin_1.930_all.deb
156 | #sudo gdebi webmin_1.930_all.deb
157 | sudo apt install snapd -y
158 |
159 | echo "-----------------------------------------------------------"
160 | echo "Done! The Odoo production platform is ready:"
161 |
162 | echo "Restart restart ur computer and start developing and have fun ;)"
163 | echo "-----------------------------------------------------------"
164 |
--------------------------------------------------------------------------------
/fast.md:
--------------------------------------------------------------------------------
1 |
2 | mkdir /etc/odoo
3 |
4 | mkdir /var/log/odoo
5 |
6 | touch /etc/odoo/odoo11.conf
7 |
8 | touch /etc/odoo/odoo12.conf
9 |
10 | touch /var/log/odoo/odoo11-server.log
11 |
12 | touch /var/log/odoo/odoo12-server.log
13 |
14 | chown odoo11:odoo11 /var/log/odoo/odoo11-server.log
15 |
16 | chown odoo12:odoo12 /var/log/odoo/odoo12-server.log
17 |
18 | chown odoo12:odoo12 /etc/odoo/odoo12.conf
19 |
20 | chown odoo11:odoo11 /etc/odoo/odoo11.conf
21 |
22 | ---------------------------------------------
23 |
24 | touch /etc/odoo/odoo.conf
25 |
26 | touch /var/log/odoo/odoo-server.log
27 |
28 |
29 | chown odoo:odoo /var/log/odoo/odoo-server.log
30 |
31 | chown odoo:odoo /etc/odoo/odoo.conf
32 |
33 |
34 | sudo nano /etc/systemd/system/odoo.service
35 |
36 | sudo systemctl daemon-reload
37 |
38 | sudo systemctl enable odoo
39 |
40 | sudo systemctl start odoo
41 |
42 | ---------------------------------------------------
43 |
44 | RewriteCond %{HTTP_HOST} =www.mah007.com
45 |
46 | RewriteRule ^(.*) https://mah007.com/ [R]
47 |
48 | RewriteCond %{SERVER_NAME} =mah007.com [OR]
49 |
50 | RewriteCond %{SERVER_NAME} =webmail.mah007.com [OR]
51 |
52 | RewriteCond %{SERVER_NAME} =admin.mah007.com [OR]
53 |
54 | RewriteCond %{SERVER_NAME} =www.mah007.com
55 |
56 | RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
57 |
--------------------------------------------------------------------------------
/new_nginx.conf:
--------------------------------------------------------------------------------
1 | #odoo server
2 | upstream odoo {
3 | server 127.0.0.1:8069;
4 | }
5 | upstream odoochat {
6 | server 127.0.0.1:8072;
7 | }
8 | map $http_upgrade $connection_upgrade {
9 | default upgrade;
10 | '' close;
11 | }
12 |
13 | # http -> https
14 | server {
15 | listen 80;
16 | server_name odoo.mycompany.com;
17 | rewrite ^(.*) https://$host$1 permanent;
18 | }
19 |
20 | server {
21 | listen 443 ssl;
22 | server_name odoo.mycompany.com;
23 | proxy_read_timeout 720s;
24 | proxy_connect_timeout 720s;
25 | proxy_send_timeout 720s;
26 | client_max_body_size 1G;
27 |
28 | # SSL parameters
29 | ssl_certificate /etc/ssl/nginx/server.crt;
30 | ssl_certificate_key /etc/ssl/nginx/server.key;
31 | ssl_session_timeout 30m;
32 | ssl_protocols TLSv1.2;
33 | ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
34 | ssl_prefer_server_ciphers off;
35 |
36 | # log
37 | access_log /var/log/nginx/odoo.access.log;
38 | error_log /var/log/nginx/odoo.error.log;
39 |
40 | # Redirect websocket requests to odoo gevent port
41 | location /websocket {
42 | proxy_pass http://odoochat;
43 | proxy_set_header Upgrade $http_upgrade;
44 | proxy_set_header Connection $connection_upgrade;
45 | proxy_set_header X-Forwarded-Host $http_host;
46 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
47 | proxy_set_header X-Forwarded-Proto $scheme;
48 | proxy_set_header X-Real-IP $remote_addr;
49 | }
50 |
51 | # Redirect requests to odoo backend server
52 | location / {
53 | # Add Headers for odoo proxy mode
54 | proxy_set_header X-Forwarded-Host $http_host;
55 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
56 | proxy_set_header X-Forwarded-Proto $scheme;
57 | proxy_set_header X-Real-IP $remote_addr;
58 | proxy_redirect off;
59 | proxy_pass http://odoo;
60 |
61 | # Enable HSTS
62 | add_header Strict-Transport-Security "max-age=31536000; includeSubDomains";
63 | # requires nginx 1.19.8
64 | proxy_cookie_flags session_id samesite=lax secure;
65 | }
66 |
67 | # common gzip
68 | gzip_types text/css text/scss text/plain text/xml application/xml application/json application/javascript;
69 | gzip on;
70 | }
71 |
--------------------------------------------------------------------------------
/nginx.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | sudo apt-get install nginx -y
3 | IPADR=`ifconfig eth0 2>/dev/null|awk '/inet addr:/ {print $2}'|sed 's/addr://'`
4 | nginx_file=/etc/nginx/sites-available/odoo.conf
5 | sudo su root -c "echo 'upstream odoo {
6 | server 127.0.0.1:8069 weight=1 fail_timeout=300s;
7 | }
8 | upstream odoo-im {
9 | server 127.0.0.1:8072 weight=1 fail_timeout=300s;
10 | }
11 | '" >> $nginx_file
12 | echo """server {
13 | # server port and name
14 | listen 80;
15 | server_name 0.0.0.0;
16 | """ >> $nginx_file
17 | echo '
18 | # Specifies the maximum accepted body size of a client request,
19 | # as indicated by the request header Content-Length.
20 | client_max_body_size 200m;
21 | #log files
22 | access_log /var/log/nginx/odoo-access.log;
23 | error_log /var/log/nginx/odoo-error.log;
24 |
25 | proxy_connect_timeout 600;
26 | proxy_send_timeout 600;
27 | proxy_read_timeout 600;
28 | send_timeout 600;
29 | keepalive_timeout 600;
30 |
31 | gzip on;
32 | gzip_disable "msie6";
33 | gzip_vary on;
34 | gzip_proxied any;
35 | gzip_comp_level 6;
36 | gzip_buffers 16 8k;
37 | gzip_http_version 1.1;
38 | gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype image/bmp image/png image/gif image/jpeg image/jpg;
39 |
40 | # increase proxy buffer to handle some OpenERP web requests
41 | proxy_buffers 16 64k;
42 | proxy_buffer_size 128k;
43 | location / {
44 | proxy_pass http://odoo;
45 | # force timeouts if the backend dies
46 | proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
47 | # Add Headers for odoo proxy mode
48 | # set headers
49 | proxy_set_header X-Forwarded-Host $host;
50 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
51 | proxy_set_header X-Forwarded-Proto $scheme;
52 | proxy_set_header X-Real-IP $remote_addr;
53 | # by default, do not forward anything
54 | proxy_redirect off;
55 | }
56 | location /longpolling {
57 | proxy_pass http://odoo-im;
58 | proxy_set_header Host $host;
59 | proxy_set_header X-Real-IP $remote_addr;
60 | proxy_set_header X-Forwarded-For $http_host;
61 | }
62 | # cache some static data in memory for 60mins.
63 | # under heavy load this should relieve stress on the web interface a bit.
64 | location ~* /web/static/ {
65 | proxy_cache_valid 200 60m;
66 | proxy_buffering on;
67 | expires 864000;
68 | proxy_pass http://odoo;
69 | }
70 | }' >> $nginx_file
71 | sudo ln -s $nginx_file /etc/nginx/sites-enabled/
72 | sudo service nginx restart
73 | echo 'Dear Admin, We are ready for takeoff. Just Open http://'$IPADR
74 |
--------------------------------------------------------------------------------
/odoo-server:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ### BEGIN INIT INFO
3 | # Provides: odoo-server
4 | # Required-Start: $remote_fs $syslog
5 | # Required-Stop: $remote_fs $syslog
6 | # Should-Start: $network
7 | # Should-Stop: $network
8 | # Default-Start: 2 3 4 5
9 | # Default-Stop: 0 1 6
10 | #
11 | ### END INIT INFO
12 | PATH=/bin:/sbin:/usr/bin
13 | NAME=odoo-server
14 | DESC=ODOO-SERVER
15 | # Specify the daemon path for Odoo server.
16 | # (Default for ODOO >=10: /opt/odoo/odoo-bin)
17 | # (Default for ODOO <=9: /opt/odoo/openerp-server)
18 | DAEMON=/opt/odoo/odoo-bin
19 | CONFIGFILE="/etc/odoo-server.conf" # Specify the Odoo Configuration file path.
20 |
21 | USER=odoo # Specify the user name (Default: odoo).
22 |
23 | PIDFILE=/var/run/$NAME.pid # pidfile
24 |
25 | # Additional options that are passed to the Daemon.
26 | DAEMON_ARGS="-c $CONFIGFILE"
27 |
28 | display() {
29 | RED=$(tput setaf 1)
30 | GREEN=$(tput setaf 2)
31 | NORMAL=$(tput sgr0)
32 | col=$(tput cols)
33 | case "$#" in
34 | 1)
35 | if [ $1 -eq 0 ] ; then
36 | printf '%s%*s%s' "$GREEN" $col "[ OK ] " "$NORMAL"
37 | else
38 | printf '%s%*s%s' "$RED" $col "[FAIL] " "$NORMAL"
39 | fi
40 | ;;
41 | 2)
42 | if [ $1 -eq 0 ] ; then
43 | echo "$GREEN* $2$NORMAL"
44 | else
45 | echo "$RED* $2$NORMAL"
46 | fi
47 | ;;
48 | *)
49 | echo "Invalid arguments"
50 | exit 1
51 | ;;
52 | esac
53 | }
54 |
55 | if ! [ -x $DAEMON ] ; then
56 | echo "Error in ODOO Daemon file: $DAEMON"
57 | echo "Possible error(s):"
58 | display 1 "Daemon File doesn't exists."
59 | display 1 "Daemon File is not set to executable."
60 | exit 0;
61 | fi
62 | if ! [ -r $CONFIGFILE ] ; then
63 | echo "Error in ODOO Config file: $CONFIGFILE"
64 | echo "Possible error(s):"
65 | display 1 "Config File doesn't exists."
66 | display 1 "Config File is not set to readable."
67 | exit 0;
68 | fi
69 | if ! [ -w $PIDFILE ] ; then
70 | touch $PIDFILE || echo "Permission issue: $PIDFILE" && exit 1
71 | chown $USER: $PIDFILE
72 | fi
73 |
74 | # Function that starts the daemon/service
75 | do_start() {
76 | echo $1
77 | check_status
78 | procs=$?
79 | if [ $procs -eq 0 ] ; then
80 | start-stop-daemon --start --quiet --pidfile ${PIDFILE} \
81 | --chuid ${USER} --background --make-pidfile \
82 | --exec ${DAEMON} -- ${DAEMON_ARGS}
83 | return $?
84 | else
85 | detailed_info "${DESC} is already Running !!!" $procs
86 | exit 1
87 | fi
88 | }
89 |
90 | # Function that stops the daemon/service
91 | do_stop() {
92 | echo $1
93 | check_status
94 | if [ $? -ne 0 ] ; then
95 | start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
96 | return $?
97 | else
98 | display 0 "${DESC} is already Stopped. You may try: $0 force-restart"
99 | exit 1
100 | fi
101 | }
102 |
103 | get_pids(){
104 | pids=$(ps -Ao pid,cmd | grep $DAEMON | grep -v grep | awk '{print $1}')
105 | return $pids
106 | }
107 |
108 | # Function that checks the status of daemon/service
109 | check_status() {
110 | echo $1
111 | # start-stop-daemon --status --pidfile ${PIDFILE}
112 | status=$(ps -Ao pid,cmd | grep $DAEMON | grep -v grep | awk '{print $1}' | wc -l)
113 | return $status
114 | }
115 |
116 | # Function that forcely-stops all running daemon/service
117 | force_stop() {
118 | echo $1
119 | pids=$(ps -Ao pid,cmd | grep $DAEMON | grep -v grep | awk '{print $1}')
120 | if [ ! -z "$pids" ] ; then
121 | kill -9 $pids
122 | fi
123 | return $?
124 | }
125 |
126 | detailed_info() {
127 | procs=$2
128 | if [ $procs -eq 1 ] ; then
129 | display 0 "$1"
130 | echo "FINE, ${procs} ${DESC} is Running."
131 | echo "Details :"
132 | pid=`cat $PIDFILE`
133 | echo "Start Time : $(ps -p $pid -wo lstart=)"
134 | echo "Total UpTime: $(ps -p $pid -wo etime=)"
135 | echo "Process ID : ${pid}"
136 | echo ""
137 | else
138 | display 1 "WARNING !!!"
139 | display 1 "${procs} ${DESC}s are Running !!!"
140 | pids=$(ps -Ao pid,cmd | grep $DAEMON | grep -v grep | awk '{print $1}')
141 | echo "Details :"
142 | echo -n "Process IDs : "
143 | echo $pids
144 | # echo $pids | tr ' ' ,
145 | echo "In order to fix, Hit command: $0 force-restart"
146 | echo ""
147 | fi
148 | }
149 | case "$1" in
150 | start)
151 | do_start "Starting ${DESC} "
152 | display $?
153 | ;;
154 | stop)
155 | do_stop "Stopping ${DESC} "
156 | display $?
157 | ;;
158 | status)
159 | check_status "Current Status of ${DESC}:"
160 | procs=$?
161 | if [ $procs -eq 1 ] ; then
162 | detailed_info "RUNNING" $procs
163 | elif [ $procs -eq 0 ] ; then
164 | display 1 "STOPPED"
165 | else
166 | detailed_info "" $procs
167 | fi
168 | ;;
169 | restart|reload)
170 | do_stop "Stopping ${DESC} "
171 | display $?
172 | sleep 1
173 | do_start "Starting ${DESC} "
174 | display $?
175 | ;;
176 | force-restart)
177 | force_stop "Forcely Restarting ${DESC} "
178 | sleep 1
179 | do_start "Starting ${DESC} "
180 | display $?
181 | ;;
182 | force-stop)
183 | force_stop "Forcely Stopping all running ${DESC} "
184 | display $?
185 | ;;
186 | cs)
187 | ps -Ao pid,cmd | grep $DAEMON | grep -v grep | awk '{print $1}' | wc -l
188 | ;;
189 | *)
190 | display 1 "Usage: $0 {start|stop|restart/reload|status|force-restart|force-stop}"
191 | exit 1
192 | ;;
193 | esac
194 |
195 | exit 0
196 |
--------------------------------------------------------------------------------
/odoo.conf:
--------------------------------------------------------------------------------
1 | [options]
2 | addons_path = /odoo/odoo/addons,/odoo/enterprise
3 | ;admin_passwd = admin
4 | csv_internal_sep = ,
5 | data_dir = /home/odoo/.local/share/Odoo
6 | db_host = False
7 | db_maxconn = 64
8 | db_name = False
9 | db_password = False
10 | db_port = False
11 | db_sslmode = prefer
12 | db_template = template1
13 | db_user = odoo
14 | dbfilter = ^%h$
15 | demo = {}
16 | email_from = False
17 | geoip_database = /usr/share/GeoIP/GeoLiteCity.dat
18 | http_enable = True
19 | http_interface =
20 | http_port = 8069
21 | import_partial =
22 | limit_memory_hard =
23 | limit_memory_soft =
24 | limit_request = 8192
25 | limit_time_cpu = 60
26 | limit_time_real = 120
27 | limit_time_real_cron = -1
28 | list_db = True
29 | log_db = False
30 | log_db_level = warning
31 | log_handler = :INFO
32 | log_level = info
33 | logfile = /var/log/odoo/odoo-server.log
34 | logrotate = False
35 | longpolling_port = 8072
36 | max_cron_threads = 2
37 | osv_memory_age_limit = 1.0
38 | osv_memory_count_limit = False
39 | pg_path = None
40 | pidfile = False
41 | proxy_mode = True
42 | reportgz = False
43 | server_wide_modules = web
44 | smtp_password = False
45 | smtp_port = 25
46 | smtp_server = localhost
47 | smtp_ssl = False
48 | smtp_user = False
49 | syslog = False
50 | test_commit = False
51 | test_enable = False
52 | test_file = False
53 | test_report_directory = False
54 | translate_modules = ['all']
55 | unaccent = False
56 | without_demo = False
57 | workers = 25
58 |
--------------------------------------------------------------------------------
/odoo.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Odoo Open Source ERP and CRM
3 | After=network.target
4 |
5 | [Service]
6 | Type=simple
7 | User=odoo
8 | Group=odoo
9 | ExecStart=/odoo/odoo/odoo-bin --config /etc/odoo/odoo.conf --logfile /var/log/odoo/odoo-server.log
10 | KillMode=mixed
11 |
12 | [Install]
13 | WantedBy=multi-user.target
14 |
--------------------------------------------------------------------------------
/odoo12_pro.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # to run the script "sudo /bin/sh odoo_pro.sh"
3 | ################################################################################
4 | # Script for preparing Odoo production server platform on Ubuntu 18.04 bionic (could be used for other version too)
5 | # Author: Mahmoud Abdel Latif
6 | # Mobile No: +201002688172
7 | # Email: Mah008@me.com
8 | # Website: http://www.mah007.com
9 | #-------------------------------------------------------------------------------
10 | # This script will make ur server ready for installing ODOO from 8 to 11
11 | #-------------------------------------------------------------------------------
12 | # Make a new file:
13 | # sudo nano odoo_pro.sh
14 | # Place this content in it and then make the file executable:
15 | # sudo chmod +x odoo_pro.sh
16 | # git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
17 | # Execute the script to install Odoo:
18 | # ./odoo-developing
19 | ################################################################################
20 |
21 | ##fixed parameters
22 | #instead of odoo use ur user name .EG OE_USER="mahmoud"
23 | OE_USER="odoo"
24 | #The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
25 | #Set to true if you want to install it, false if you don't need it or have it already installed.
26 | INSTALL_WKHTMLTOPDF="True"
27 |
28 | # Set this to True if you want to install Odoo 9 10 11 Enterprise! ( you can use enterprise normaly too ;) )
29 | IS_ENTERPRISE="True"
30 |
31 | ##
32 | ### WKHTMLTOPDF download links
33 | ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
34 | ## in order to have correct version of wkhtmltox installed, for a danger note refer to
35 | ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
36 | WKHTMLTOX_X64=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
37 | WKHTMLTOX_X32=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.bionic_i386.deb
38 | #--------------------------------------------------
39 | # Update Server
40 | #--------------------------------------------------
41 | echo -e "\n---- Update Server ----"
42 | sudo apt-get update
43 | sudo apt-get upgrade -y
44 |
45 | #--------------------------------------------------
46 | # Install PostgreSQL Server
47 | #--------------------------------------------------
48 | echo -e "\n---- Install PostgreSQL Server ----"
49 | sudo apt-get install postgresql postgresql-server-dev-* -y
50 |
51 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
52 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
53 |
54 | #--------------------------------------------------
55 | # Install Dependencies
56 | #--------------------------------------------------
57 | echo -e "\n---- Install tool packages ----"
58 | sudo apt-get install wget nano subversion git bzr bzrtools python-pip python3-pip gdebi-core -y pysassc
59 |
60 | echo -e "\n---- Install python packages ----"
61 | sudo apt-get install python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil python-gpgme python-launchpadlib build-essential python-all-dev python-setuptools python-imaging python-suds python-xlsxwriter python-wheel -y
62 |
63 | echo -e "\n---- Install python libraries ----"
64 | sudo pip install gdata psycogreen
65 | # This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04
66 | sudo -H pip install suds
67 |
68 | echo -e "\n--- Install other required packages"
69 | sudo apt-get install node-clean-css -y
70 | sudo apt-get install node-less -y
71 | sudo apt-get install python-gevent -y
72 | apt-get install libwww-perl -y
73 |
74 |
75 | #--------------------------------------------------
76 | # Install Wkhtmltopdf if needed
77 | #--------------------------------------------------
78 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
79 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 9 ----"
80 | #pick up correct one from x64 & x32 versions:
81 | if [ "`getconf LONG_BIT`" == "64" ];then
82 | _url=$WKHTMLTOX_X64
83 | else
84 | _url=$WKHTMLTOX_X32
85 | fi
86 | sudo wget $_url
87 | sudo gdebi --n `basename $_url`
88 | sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
89 | sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
90 | else
91 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
92 | fi
93 |
94 |
95 |
96 |
97 | if [ $IS_ENTERPRISE = "True" ]; then
98 | # Odoo Enterprise install!
99 |
100 | echo -e "\n---- Installing Enterprise specific libraries ----"
101 | sudo apt-get install nodejs npm -y
102 | sudo npm install -g less
103 | sudo npm install -g less-plugin-clean-css
104 | sudo npm install -g rtlcss
105 | else
106 | echo -e "\n---- every thing is ready ----"
107 |
108 | fi
109 | sudo ln -s /usr/bin/nodejs /usr/bin/node
110 |
111 | sudo apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev python3-dev
112 | sudo easy_install greenlet
113 | sudo easy_install gevent
114 | sudo apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev python3-pip python3-wheel python3-setuptools
115 | sudo -H pip install -r https://raw.githubusercontent.com/odoo/odoo/11.0/requirements.txt
116 | sudo apt install -y python3-asn1crypto
117 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-vatnumber python3-werkzeug python3-xlsxwriter python3-yaml
118 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/12.0/requirements.txt
119 | sudo -H pip3 install phonenumbers
120 |
121 |
122 | echo "-----------------------------------------------------------"
123 | echo "Done! The Odoo production platform is ready:"
124 |
125 | echo "Restart restart ur computer and start developing and have fun ;)"
126 | echo "-----------------------------------------------------------"
127 |
--------------------------------------------------------------------------------
/odoo14_dev.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # to run the script "sudo /bin/sh odoo_pro.sh"
3 | ################################################################################
4 | # Script for preparing Odoo production server platform on Ubuntu 14.04, 15.04 and 16.04 (could be used for other version too)
5 | # Author: Mahmoud Abdel Latif
6 | # Mobile No: +201002688172
7 | # Email: Mah008@me.com
8 | # Website: http://www.mah007.com
9 | #-------------------------------------------------------------------------------
10 | # This script will make ur server ready for installing ODOO from 8 to 14
11 | #-------------------------------------------------------------------------------
12 | # Make a new file:
13 | # sudo nano odoo_pro.sh
14 | # Place this content in it and then make the file executable:
15 | # sudo chmod +x odoo_pro.sh
16 | # git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
17 | # Execute the script to install Odoo:
18 | # ./odoo-developing
19 | ################################################################################
20 |
21 | ##fixed parameters
22 | #instead of odoo use ur user name .EG OE_USER="mahmoud"
23 | OE_USER="odoo"
24 | OE_BRANCH="14.0"
25 | #The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
26 | #Set to true if you want to install it, false if you don't need it or have it already installed.
27 | INSTALL_WKHTMLTOPDF="True"
28 |
29 | # Set this to True if you want to install Odoo 9 10 11 12 13 14Enterprise! ( you can use enterprise normaly too ;) )
30 | IS_ENTERPRISE="True"
31 |
32 | ##
33 | ### WKHTMLTOPDF download links
34 | ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
35 | ## in order to have correct version of wkhtmltox installed, for a danger note refer to
36 | ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
37 | WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
38 | WKHTMLTOX_X32=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_i386.deb
39 | #--------------------------------------------------
40 | # Update Server
41 | #--------------------------------------------------
42 | echo -e "\n---- Update Server ----"
43 | sudo apt-get update
44 | sudo apt-get upgrade -y
45 | apt install -y zip
46 | echo "----------------------------localization-------------------------------"
47 |
48 | export LC_ALL="en_US.UTF-8"
49 | export LC_CTYPE="en_US.UTF-8"
50 | sudo dpkg-reconfigure locales
51 |
52 | #--------------------------------------------------
53 | # Install PostgreSQL Server
54 | #--------------------------------------------------
55 | wget https://raw.githubusercontent.com/mah007/OdooScript/12.0/pgdg.list
56 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/webmin.list
57 | cp pgdg.list /etc/apt/sources.list.d
58 | cp webmin.list /etc/apt/sources.list.d
59 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
60 | sudo apt-get update
61 |
62 | echo -e "\n---- Install PostgreSQL Server ----"
63 | sudo apt-get install postgresql-13 postgresql-server-dev-13 -y
64 |
65 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
66 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
67 |
68 | #--------------------------------------------------
69 | # Install Dependencies
70 | #--------------------------------------------------
71 | echo -e "\n---- Install tool packages ----"
72 | sudo apt-get install wget nano subversion git bzr bzrtools python-pip python3-pip gdebi-core -y pysassc
73 |
74 | echo -e "\n---- Install python packages ----"
75 | sudo apt-get install python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil python-gpgme python-launchpadlib build-essential python-all-dev python-setuptools python-imaging python-suds python-xlsxwriter python-wheel -y
76 |
77 | echo -e "\n---- Install python libraries ----"
78 | sudo pip install gdata psycogreen
79 | # This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04
80 | sudo -H pip install suds
81 |
82 | echo -e "\n--- Install other required packages"
83 | sudo apt-get install node-clean-css -y
84 | sudo apt-get install node-less -y
85 | sudo apt-get install python-gevent -y
86 | apt-get install libwww-perl -y
87 | #sudo apt install ifupdown -y
88 |
89 |
90 | #--------------------------------------------------
91 | # Install Wkhtmltopdf if needed
92 | #--------------------------------------------------
93 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
94 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 9 ----"
95 | #pick up correct one from x64 & x32 versions:
96 | if [ "`getconf LONG_BIT`" == "64" ];then
97 | _url=$WKHTMLTOX_X64
98 | else
99 | _url=$WKHTMLTOX_X32
100 | fi
101 | sudo wget $_url
102 | sudo gdebi --n `basename $_url`
103 | sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
104 | sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
105 | else
106 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
107 | fi
108 |
109 |
110 |
111 |
112 | if [ $IS_ENTERPRISE = "True" ]; then
113 | # Odoo Enterprise install!
114 |
115 | echo -e "\n---- Installing Enterprise specific libraries ----"
116 | sudo apt-get install nodejs npm -y
117 | sudo npm install -g less
118 | sudo npm install -g less-plugin-clean-css
119 | sudo npm install -g rtlcss
120 | else
121 | echo -e "\n---- every thing is ready ----"
122 |
123 | fi
124 | sudo ln -s /usr/bin/nodejs /usr/bin/node
125 |
126 | sudo apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev python3-dev
127 | sudo easy_install greenlet
128 | sudo easy_install gevent
129 | sudo apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev python3-pip python3-wheel python3-setuptools
130 | sudo -H pip install -r https://raw.githubusercontent.com/odoo/odoo/10.0/requirements.txt
131 | sudo apt install -y python3-asn1crypto
132 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-vatnumber python3-werkzeug python3-xlsxwriter python3-yaml
133 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/11.0/requirements.txt
134 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/12.0/requirements.txt
135 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/13.0/requirements.txt
136 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/14.0/requirements.txt
137 | sudo -H pip3 install -r https://raw.githubusercontent.com/mah007/OdooScript/14.0/requirements.txt
138 | sudo -H pip3 install phonenumbers
139 |
140 | echo "-----------------------------------------------------------"
141 | echo "Done! The Odoo production platform is ready:"
142 |
143 | echo "Restart restart ur computer and start developing and have fun ;)"
144 | echo "-----------------------------------------------------------"
145 |
--------------------------------------------------------------------------------
/odoo14_dev20.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # to run the script "sudo /bin/sh odoo_pro.sh"
3 | ################################################################################
4 | # Script for preparing Odoo production server platform on Ubuntu 20.04 (could be used for other version too)
5 | # Author: Mahmoud Abdel Latif
6 | # Mobile No: +201002688172
7 | # Email: Mah008@me.com
8 | # Website: http://www.mah007.com
9 | #-------------------------------------------------------------------------------
10 | # This script will make ur server ready for installing ODOO from 8 to 14
11 | #-------------------------------------------------------------------------------
12 | # Make a new file:
13 | # sudo nano odoo_pro.sh
14 | # Place this content in it and then make the file executable:
15 | # sudo chmod +x odoo_pro.sh
16 | # git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
17 | # Execute the script to install Odoo:
18 | # ./odoo-developing
19 | ################################################################################
20 |
21 | ##fixed parameters
22 | #instead of odoo use ur user name .EG OE_USER="mahmoud"
23 | OE_USER="mahmoud"
24 | OE_BRANCH="14.0"
25 | #The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
26 | #Set to true if you want to install it, false if you don't need it or have it already installed.
27 | INSTALL_WKHTMLTOPDF="True"
28 |
29 | # Set this to True if you want to install Odoo 9 10 11 12 13 14Enterprise! ( you can use enterprise normaly too ;) )
30 | IS_ENTERPRISE="True"
31 |
32 | ##
33 | ### WKHTMLTOPDF download links
34 | ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
35 | ## in order to have correct version of wkhtmltox installed, for a danger note refer to
36 | ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
37 | WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
38 | WKHTMLTOX_X32=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_i386.deb
39 | #--------------------------------------------------
40 | # Update Server
41 | #--------------------------------------------------
42 | echo -e "\n---- Update Server ----"
43 | sudo apt-get update
44 | sudo apt-get upgrade -y
45 | apt install -y zip
46 | echo "----------------------------localization-------------------------------"
47 |
48 | export LC_ALL="en_US.UTF-8"
49 | export LC_CTYPE="en_US.UTF-8"
50 | sudo dpkg-reconfigure locales
51 |
52 | #--------------------------------------------------
53 | # Install PostgreSQL Server
54 | #--------------------------------------------------
55 | sudo sh -c 'echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
56 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
57 | sudo apt-get update
58 |
59 | echo -e "\n---- Install PostgreSQL Server ----"
60 | sudo apt-get install postgresql-13 postgresql-server-dev-13 -y
61 |
62 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
63 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
64 |
65 | #--------------------------------------------------
66 | # Install Dependencies
67 | #--------------------------------------------------
68 | echo -e "\n---- Install tool packages ----"
69 | #sudo apt install git python3-pip build-essential wget python3-dev python3-venv python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libjpeg8-dev libopenjp2-7-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev
70 | echo -e "\n---- Install python libraries ----"
71 | sudo pip install gdata psycogreen
72 | # This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04
73 | sudo -H pip install suds
74 |
75 | echo -e "\n--- Install other required packages"
76 | sudo apt-get install node-clean-css -y
77 | sudo apt-get install node-less -y
78 | sudo apt-get install python-gevent -y
79 | apt-get install libwww-perl -y
80 | #sudo apt install ifupdown -y
81 |
82 |
83 | #--------------------------------------------------
84 | # Install Wkhtmltopdf if needed
85 | #--------------------------------------------------
86 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
87 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 9 ----"
88 | #pick up correct one from x64 & x32 versions:
89 | if [ "`getconf LONG_BIT`" == "64" ];then
90 | _url=$WKHTMLTOX_X64
91 | else
92 | _url=$WKHTMLTOX_X32
93 | fi
94 | sudo wget $_url
95 | sudo gdebi --n `basename $_url`
96 | sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
97 | sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
98 | else
99 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
100 | fi
101 |
102 |
103 |
104 |
105 | if [ $IS_ENTERPRISE = "True" ]; then
106 | # Odoo Enterprise install!
107 |
108 | echo -e "\n---- Installing Enterprise specific libraries ----"
109 | sudo apt-get install nodejs npm -y
110 | sudo npm install -g less
111 | sudo npm install -g less-plugin-clean-css
112 | sudo npm install -g rtlcss
113 | else
114 | echo -e "\n---- every thing is ready ----"
115 |
116 | fi
117 | sudo ln -s /usr/bin/nodejs /usr/bin/node
118 |
119 | sudo apt-get install -y python3-dev
120 | sudo easy_install greenlet
121 | sudo easy_install gevent
122 | sudo apt-get install -y python3-pip python3-wheel python3-setuptools
123 | sudo -H pip3 install --upgrade pip
124 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/14.0/requirements.txt
125 | sudo apt install -y python3-asn1crypto
126 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-vatnumber python3-werkzeug python3-xlsxwriter python3-yaml
127 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/11.0/requirements.txt
128 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/12.0/requirements.txt
129 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/13.0/requirements.txt
130 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/14.0/requirements.txt
131 | sudo -H pip3 install -r https://raw.githubusercontent.com/mah007/OdooScript/14.0/requirements.txt
132 | sudo -H pip3 install phonenumbers
133 | echo "---------------------------odoo directory--------------------------------"
134 | # mkdir /odoo
135 | # mkdir /etc/odoo
136 | # mkdir /var/log/odoo
137 | # touch /etc/odoo/odoo.conf
138 | # touch /var/log/odoo/odoo-server.log
139 | # chown odoo:odoo /var/log/odoo/odoo-server.log
140 | # chown odoo:odoo /etc/odoo/odoo.conf
141 | # cd /odoo
142 |
143 | # sudo git clone --depth 1 --branch $OE_BRANCH https://www.github.com/odoo/odoo
144 | # cd /
145 |
146 | # chown -R odoo:odoo /odoo
147 |
148 | # cd /root
149 | # echo "-------------------------------odoo service----------------------------"
150 | # wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/odoo.service
151 | # cp odoo.service /etc/systemd/system
152 | # sudo systemctl daemon-reload
153 | # sudo systemctl enable odoo
154 | # sudo systemctl start odoo
155 | # echo "----------------------------NGINX-------------------------------"
156 | # wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/nginx.sh
157 | # bash nginx.sh
158 | # echo "---------------------------webmin--------------------------------"
159 | # apt-get install -y perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
160 | # wget https://download.webmin.com/jcameron-key.asc
161 | # apt-key add jcameron-key.asc
162 | # apt-get install apt-transport-https -y
163 | # apt-get update
164 | # apt-get install webmin -y
165 |
166 |
167 | echo "-----------------------------------------------------------"
168 | echo "Done! The Odoo production platform is ready:"
169 |
170 | echo "Restart restart ur computer and start developing and have fun ;)"
171 | echo "-----------------------------------------------------------"
172 |
--------------------------------------------------------------------------------
/odoo15_2204.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # to run the script "sudo /bin/sh odoo15_2204.sh"
3 | # this script is for Ubuntu server 22.04 Jammy
4 | ################################################################################
5 | # Script for preparing Odoo production server platform on Ubuntu 20.04 (could be used for other version too)
6 | # Author: Mahmoud Abdel Latif
7 | # Mobile No: +201002688172
8 | # Email: Mah008@me.com
9 | # Website: http://www.mah007.com
10 | #-------------------------------------------------------------------------------
11 | # This script will make ur server ready for installing ODOO from 8 to 14
12 | #-------------------------------------------------------------------------------
13 | # Make a new file:
14 | # sudo nano odoo_pro.sh
15 | # Place this content in it and then make the file executable:
16 | # sudo chmod +x odoo_pro.sh
17 | # git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
18 | # Execute the script to install Odoo:
19 | # ./odoo-developing
20 | ################################################################################
21 |
22 | ##fixed parameters
23 | #instead of odoo use ur user name .EG OE_USER="mahmoud"
24 | OE_USER="odoo"
25 | OE_BRANCH="15.0"
26 |
27 | # Add group
28 | groupadd $OE_USER
29 | # Add user
30 | useradd --create-home -d /home/$OE_USER --shell /bin/bash -g $OE_USER $OE_USER
31 | # add user to sudoers
32 | usermod -aG sudo $OE_USER
33 | #The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
34 | #Set to true if you want to install it, false if you don't need it or have it already installed.
35 | INSTALL_WKHTMLTOPDF="True"
36 |
37 | # Set this to True if you want to install Odoo 9 10 11 12 13 14Enterprise! ( you can use enterprise normaly too ;) )
38 | IS_ENTERPRISE="True"
39 |
40 | ##
41 | ### WKHTMLTOPDF download links
42 | ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
43 | ## in order to have correct version of wkhtmltox installed, for a danger note refer to
44 | ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
45 | WKHTMLTOX_X64=https://github.com/odoo/wkhtmltopdf/releases/download/nightly/odoo-wkhtmltopdf-ubuntu-jammy-x86_64-0.13.0-nightly.deb
46 | WKHTMLTOX_X32=https://github.com/odoo/wkhtmltopdf/releases/download/nightly/odoo-wkhtmltopdf-ubuntu-jammy-x86_64-0.13.0-nightly.deb
47 |
48 | #--------------------------------------------------
49 | # Update Server
50 | #--------------------------------------------------
51 | echo -e "\n---- Update Server ----"
52 | sudo apt-get update
53 | sudo apt-get upgrade -y
54 | apt install -y zip gdebi net-tools
55 | echo "----------------------------localization-------------------------------"
56 |
57 | export LC_ALL="en_US.UTF-8"
58 | export LC_CTYPE="en_US.UTF-8"
59 | sudo dpkg-reconfigure locales
60 |
61 | #--------------------------------------------------
62 | # Install PostgreSQL Server
63 | #--------------------------------------------------
64 | sudo sh -c 'echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
65 | # wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/webmin.list
66 | # cp webmin.list /etc/apt/sources.list.d
67 | curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh
68 | sh setup-repos.sh
69 |
70 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
71 | sudo apt-get update
72 |
73 | echo -e "\n---- Install PostgreSQL Server ----"
74 | sudo apt-get install postgresql-15 postgresql-server-dev-15 -y
75 |
76 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
77 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
78 |
79 | #--------------------------------------------------
80 | # Install Dependencies
81 | #--------------------------------------------------
82 | echo -e "\n---- Install tool packages ----"
83 | sudo apt install -y git python3-pip build-essential wget python3-dev python3-venv python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libjpeg8-dev libopenjp2-7-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev
84 | echo -e "\n---- Install python libraries ----"
85 | sudo pip install gdata psycogreen
86 | # This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04 .... 20.04 ...22.04
87 | sudo -H pip install suds
88 |
89 | echo -e "\n--- Install other required packages"
90 | sudo apt-get install node-clean-css -y
91 | sudo apt-get install node-less -y
92 | sudo apt-get install python-gevent -y
93 | apt-get install libwww-perl -y
94 | #sudo apt install ifupdown -y
95 |
96 |
97 | #--------------------------------------------------
98 | # Install Wkhtmltopdf if needed
99 | #--------------------------------------------------
100 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
101 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 15.0 ----"
102 | #pick up correct one from x64 & x32 versions:
103 | if [ "`getconf LONG_BIT`" == "64" ];then
104 | _url=$WKHTMLTOX_X64
105 | else
106 | _url=$WKHTMLTOX_X32
107 | fi
108 | sudo wget $_url
109 | sudo gdebi --n `basename $_url`
110 |
111 | else
112 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
113 | fi
114 |
115 |
116 |
117 |
118 |
119 | # Odoo Enterprise install!
120 | sudo apt-get update
121 | sudo apt-get install -y ca-certificates curl gnupg gsfonts
122 | sudo mkdir -p /etc/apt/keyrings
123 | curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
124 | NODE_MAJOR=20
125 | echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
126 |
127 | sudo apt-get update
128 | sudo apt-get install nodejs -y
129 |
130 | echo -e "\n---- Installing Enterprise specific libraries ----"
131 |
132 | sudo npm install -g less
133 | sudo npm install -g less-plugin-clean-css
134 | sudo npm install -g rtlcss
135 |
136 | echo -e "\n---- every thing is ready ----"
137 |
138 |
139 | sudo ln -s /usr/bin/nodejs /usr/bin/node
140 |
141 | sudo apt-get install -y python3-dev
142 | sudo easy_install greenlet
143 | sudo easy_install gevent
144 | sudo apt-get install -y python3-pip python3-wheel python3-setuptools
145 | sudo -H pip3 install --upgrade pip
146 | sudo apt install -y python3-asn1crypto
147 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-werkzeug python3-xlsxwriter python3-yaml
148 | pip3 install -r https://raw.githubusercontent.com/odoo/odoo/15.0/requirements.txt --user
149 | # pip3 install -r https://raw.githubusercontent.com/mah007/OdooScript/14.0/requirements.txt --user
150 | pip3 install phonenumbers --user
151 | echo "---------------------------odoo directory--------------------------------"
152 | mkdir /odoo
153 | mkdir /etc/odoo
154 | mkdir /var/log/odoo
155 | touch /etc/odoo/odoo.conf
156 | touch /var/log/odoo/odoo-server.log
157 | chown odoo:odoo /var/log/odoo/odoo-server.log
158 | chown odoo:odoo /etc/odoo/odoo.conf
159 | cd /odoo
160 |
161 | sudo git clone --depth 1 --branch $OE_BRANCH https://www.github.com/odoo/odoo
162 | cd /
163 |
164 | chown -R odoo:odoo /odoo
165 |
166 | cd /root
167 | echo "-------------------------------odoo service----------------------------"
168 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/odoo.service
169 | cp odoo.service /etc/systemd/system
170 | sudo systemctl daemon-reload
171 | sudo systemctl enable odoo
172 | sudo systemctl start odoo
173 | echo "----------------------------NGINX-------------------------------"
174 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/nginx.sh
175 | bash nginx.sh
176 | echo "---------------------------webmin--------------------------------"
177 | apt-get install -y perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
178 | wget https://download.webmin.com/jcameron-key.asc
179 | apt-key add jcameron-key.asc
180 | apt-get install apt-transport-https -y
181 | apt-get update
182 | apt-get install -y webmin --install-recommends
183 |
184 |
185 | echo "-----------------------------------------------------------"
186 | echo "Done! The Odoo production platform is ready:"
187 |
188 | echo "Restart restart ur computer and start developing and have fun ;)"
189 | echo "-----------------------------------------------------------"
190 |
--------------------------------------------------------------------------------
/odoo15_pro.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # to run the script "sudo /bin/sh odoo_pro.sh"
3 | ################################################################################
4 | # Script for preparing Odoo production server platform on Ubuntu 20.04 (could be used for other version too)
5 | # Author: Mahmoud Abdel Latif
6 | # Mobile No: +201002688172
7 | # Email: Mah008@me.com
8 | # Website: http://www.mah007.com
9 | #-------------------------------------------------------------------------------
10 | # This script will make ur server ready for installing ODOO from 8 to 14
11 | #-------------------------------------------------------------------------------
12 | # Make a new file:
13 | # sudo nano odoo_pro.sh
14 | # Place this content in it and then make the file executable:
15 | # sudo chmod +x odoo_pro.sh
16 | # git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
17 | # Execute the script to install Odoo:
18 | # ./odoo-developing
19 | ################################################################################
20 |
21 | ##fixed parameters
22 | #instead of odoo use ur user name .EG OE_USER="mahmoud"
23 | OE_USER="odoo"
24 | OE_BRANCH="15.0"
25 |
26 | # Add group
27 | groupadd $OE_USER
28 | # Add user
29 | useradd --create-home -d /home/$OE_USER --shell /bin/bash -g $OE_USER $OE_USER
30 | # add user to sudoers
31 | usermod -aG sudo $OE_USER
32 | #The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
33 | #Set to true if you want to install it, false if you don't need it or have it already installed.
34 | INSTALL_WKHTMLTOPDF="True"
35 |
36 | # Set this to True if you want to install Odoo 9 10 11 12 13 14Enterprise! ( you can use enterprise normaly too ;) )
37 | IS_ENTERPRISE="True"
38 |
39 | ##
40 | ### WKHTMLTOPDF download links
41 | ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
42 | ## in order to have correct version of wkhtmltox installed, for a danger note refer to
43 | ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
44 | WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
45 | WKHTMLTOX_X32=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_i386.deb
46 | #--------------------------------------------------
47 | # Update Server
48 | #--------------------------------------------------
49 | echo -e "\n---- Update Server ----"
50 | sudo apt-get update
51 | sudo apt-get upgrade -y
52 | apt install -y zip gdebi net-tools
53 | echo "----------------------------localization-------------------------------"
54 |
55 | export LC_ALL="en_US.UTF-8"
56 | export LC_CTYPE="en_US.UTF-8"
57 | sudo dpkg-reconfigure locales
58 |
59 | #--------------------------------------------------
60 | # Install PostgreSQL Server
61 | #--------------------------------------------------
62 | sudo sh -c 'echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
63 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/webmin.list
64 | cp webmin.list /etc/apt/sources.list.d
65 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
66 | sudo apt-get update
67 |
68 | echo -e "\n---- Install PostgreSQL Server ----"
69 | sudo apt-get install postgresql-15 postgresql-server-dev-15 -y
70 |
71 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
72 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
73 |
74 | #--------------------------------------------------
75 | # Install Dependencies
76 | #--------------------------------------------------
77 | echo -e "\n---- Install tool packages ----"
78 | sudo apt install -y git python3-pip build-essential wget python3-dev python3-venv python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libjpeg8-dev libopenjp2-7-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev
79 | echo -e "\n---- Install python libraries ----"
80 | sudo pip install gdata psycogreen
81 | # This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04 .... 20.04
82 | sudo -H pip install suds
83 |
84 | echo -e "\n--- Install other required packages"
85 | sudo apt-get install node-clean-css -y
86 | sudo apt-get install node-less -y
87 | sudo apt-get install python-gevent -y
88 | apt-get install libwww-perl -y
89 | #sudo apt install ifupdown -y
90 |
91 |
92 | #--------------------------------------------------
93 | # Install Wkhtmltopdf if needed
94 | #--------------------------------------------------
95 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
96 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 9 ----"
97 | #pick up correct one from x64 & x32 versions:
98 | if [ "`getconf LONG_BIT`" == "64" ];then
99 | _url=$WKHTMLTOX_X64
100 | else
101 | _url=$WKHTMLTOX_X32
102 | fi
103 | sudo wget $_url
104 | sudo gdebi --n `basename $_url`
105 | sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
106 | sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
107 | else
108 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
109 | fi
110 |
111 |
112 |
113 |
114 | if [ $IS_ENTERPRISE = "True" ]; then
115 | # Odoo Enterprise install!
116 |
117 | echo -e "\n---- Installing Enterprise specific libraries ----"
118 | sudo apt-get install nodejs npm -y
119 | sudo npm install -g less
120 | sudo npm install -g less-plugin-clean-css
121 | sudo npm install -g rtlcss
122 | else
123 | echo -e "\n---- every thing is ready ----"
124 |
125 | fi
126 | sudo ln -s /usr/bin/nodejs /usr/bin/node
127 |
128 | sudo apt-get install -y python3-dev
129 | sudo easy_install greenlet
130 | sudo easy_install gevent
131 | sudo apt-get install -y python3-pip python3-wheel python3-setuptools
132 | sudo -H pip3 install --upgrade pip
133 | sudo apt install -y python3-asn1crypto
134 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-vatnumber python3-werkzeug python3-xlsxwriter python3-yaml
135 | pip3 install -r https://raw.githubusercontent.com/odoo/odoo/15.0/requirements.txt --user
136 | pip3 install -r https://raw.githubusercontent.com/mah007/OdooScript/14.0/requirements.txt --user
137 | pip3 install phonenumbers --user
138 | echo "---------------------------odoo directory--------------------------------"
139 | mkdir /odoo
140 | mkdir /etc/odoo
141 | mkdir /var/log/odoo
142 | touch /etc/odoo/odoo.conf
143 | touch /var/log/odoo/odoo-server.log
144 | chown odoo:odoo /var/log/odoo/odoo-server.log
145 | chown odoo:odoo /etc/odoo/odoo.conf
146 | cd /odoo
147 |
148 | sudo git clone --depth 1 --branch $OE_BRANCH https://www.github.com/odoo/odoo
149 | cd /
150 |
151 | chown -R odoo:odoo /odoo
152 |
153 | cd /root
154 | echo "-------------------------------odoo service----------------------------"
155 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/odoo.service
156 | cp odoo.service /etc/systemd/system
157 | sudo systemctl daemon-reload
158 | sudo systemctl enable odoo
159 | sudo systemctl start odoo
160 | echo "----------------------------NGINX-------------------------------"
161 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/nginx.sh
162 | bash nginx.sh
163 | echo "---------------------------webmin--------------------------------"
164 | apt-get install -y perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
165 | wget https://download.webmin.com/jcameron-key.asc
166 | apt-key add jcameron-key.asc
167 | apt-get install apt-transport-https -y
168 | apt-get update
169 | apt-get install webmin -y
170 |
171 |
172 | echo "-----------------------------------------------------------"
173 | echo "Done! The Odoo production platform is ready:"
174 |
175 | echo "Restart restart ur computer and start developing and have fun ;)"
176 | echo "-----------------------------------------------------------"
177 |
--------------------------------------------------------------------------------
/odoo17_pro.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Function to display colorful billboard message
4 | display_billboard() {
5 | printf "\e[91m\e[1m==================================================\e[0m\n"
6 | printf "\e[93m\e[1m%s\e[0m\n" "$1"
7 | printf "\e[91m\e[1m==================================================\e[0m\n"
8 | }
9 |
10 | # Function to prompt user for Odoo version
11 | select_odoo_version() {
12 | echo "Please select the Odoo version:"
13 | echo "1) Odoo 14.0"
14 | echo "2) Odoo 15.0"
15 | echo "3) Odoo 16.0"
16 | echo "4) Odoo 17.0"
17 | echo "5) Odoo 18.0"
18 |
19 | read -rp "Enter your choice (1-5): " choice
20 |
21 | case $choice in
22 | 1) OE_BRANCH="14.0";;
23 | 2) OE_BRANCH="15.0";;
24 | 3) OE_BRANCH="16.0";;
25 | 4) OE_BRANCH="17.0";;
26 | 5) OE_BRANCH="18.0";;
27 | *) echo "Invalid choice. Please enter a number between 1 and 4."; exit 1;;
28 | esac
29 | }
30 |
31 | # Display billboard message
32 | billboard_message="Welcome to the Odoo Production Server Setup Script!"
33 | display_billboard "$billboard_message"
34 |
35 | # Prompt user for Odoo version
36 | select_odoo_version
37 |
38 | # Fixed parameters
39 | OE_USER="odoo"
40 |
41 | # Add group
42 | groupadd "$OE_USER"
43 | # Add user
44 | useradd --create-home -d /home/"$OE_USER" --shell /bin/bash -g "$OE_USER" "$OE_USER"
45 | # Add user to sudoers
46 | usermod -aG sudo "$OE_USER"
47 |
48 | # The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
49 | # Set to true if you want to install it, false if you don't need it or have it already installed.
50 | INSTALL_WKHTMLTOPDF="True"
51 |
52 | # Set this to True if you want to install Odoo 9 10 11 12 13 14Enterprise! (you can use enterprise normally too)
53 | IS_ENTERPRISE="True"
54 |
55 | # WKHTMLTOPDF download links
56 | WKHTMLTOX_X64="https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb"
57 | WKHTMLTOX_X32="https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb"
58 |
59 | # Update Server
60 | echo -e "\n---- Update Server ----"
61 | sudo apt-get update
62 | sudo apt-get upgrade -y
63 | apt install -y zip gdebi net-tools
64 | echo "----------------------------localization-------------------------------"
65 |
66 | export LC_ALL="en_US.UTF-8"
67 | export LC_CTYPE="en_US.UTF-8"
68 | sudo dpkg-reconfigure locales
69 |
70 | # Install PostgreSQL Server
71 | sudo sh -c 'echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
72 | curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh
73 | sh setup-repos.sh
74 |
75 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
76 | sudo apt-get update
77 |
78 | echo -e "\n---- Install PostgreSQL Server ----"
79 | sudo apt-get install postgresql-16 postgresql-server-dev-16 -y
80 |
81 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
82 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
83 |
84 | # Install Dependencies
85 | echo -e "\n---- Install tool packages ----"
86 | sudo apt install -y git python3-pip build-essential wget python3-dev python3-venv python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libjpeg8-dev libopenjp2-7-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev
87 | echo -e "\n---- Install python libraries ----"
88 | sudo pip install gdata psycogreen
89 | sudo -H pip install suds
90 |
91 | echo -e "\n--- Install other required packages"
92 | sudo apt-get install node-clean-css -y
93 | sudo apt-get install node-less -y
94 | sudo apt-get install python-gevent -y
95 | sudo apt-get install gsfonts libcairo2-dev python3-cairo -y
96 |
97 | pip3 install rlPyCairo
98 | apt-get install libwww-perl -y
99 |
100 | # Install Wkhtmltopdf if needed
101 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
102 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 15.0 ----"
103 | if [ "`getconf LONG_BIT`" == "64" ];then
104 | _url=$WKHTMLTOX_X64
105 | else
106 | _url=$WKHTMLTOX_X32
107 | fi
108 | sudo wget $_url
109 | sudo gdebi --n `basename $_url`
110 | else
111 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
112 | fi
113 |
114 | # Odoo Enterprise install
115 | sudo apt-get update
116 | sudo apt-get install -y ca-certificates curl gnupg
117 | sudo mkdir -p /etc/apt/keyrings
118 | curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
119 | NODE_MAJOR=20
120 | echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
121 | sudo apt-get update
122 | sudo apt-get install nodejs -y
123 |
124 | echo -e "\n---- Installing Enterprise specific libraries ----"
125 | sudo npm install -g less
126 | sudo npm install -g less-plugin-clean-css
127 | sudo npm install -g rtlcss
128 |
129 | echo -e "\n---- everything is ready ----"
130 |
131 | sudo ln -s /usr/bin/nodejs /usr/bin/node
132 |
133 | sudo apt-get install -y python3-dev
134 | sudo easy_install greenlet
135 | sudo easy_install gevent
136 | sudo apt-get install -y python3-pip python3-wheel python3-setuptools
137 | sudo -H pip3 install --upgrade pip
138 | sudo apt install -y python3-asn1crypto
139 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-werkzeug python3-xlsxwriter python3-yaml
140 | pip3 install -r https://raw.githubusercontent.com/odoo/odoo/"$OE_BRANCH"/requirements.txt --user
141 | pip3 install phonenumbers --user
142 |
143 | mkdir /odoo
144 | mkdir /etc/odoo
145 | mkdir /var/log/odoo
146 | touch /etc/odoo/odoo.conf
147 | touch /var/log/odoo/odoo-server.log
148 | chown -R odoo:odoo /var/log/odoo
149 | chown -R odoo:odoo /etc/odoo
150 | cd /odoo
151 |
152 | sudo git clone --depth 1 --branch "$OE_BRANCH" https://www.github.com/odoo/odoo
153 | cd /
154 |
155 | chown -R odoo:odoo /odoo
156 | su - $OE_USER -s /bin/bash -c "pip3 install -r https://raw.githubusercontent.com/odoo/odoo/"$OE_BRANCH"/requirements.txt --user"
157 | cd /root
158 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/odoo.service
159 | cp odoo.service /etc/systemd/system
160 | sudo systemctl daemon-reload
161 | sudo systemctl enable odoo
162 | sudo systemctl start odoo
163 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/nginx.sh
164 | bash nginx.sh
165 | apt-get install -y perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
166 | wget https://download.webmin.com/jcameron-key.asc
167 | apt-key add jcameron-key.asc
168 | apt-get install apt-transport-https -y
169 | apt-get update
170 | apt-get install -y webmin --install-recommends
171 |
172 | echo "-----------------------------------------------------------"
173 | echo "Done! The Odoo production platform is ready:"
174 | echo "Restart your computer and start developing. Have fun! ;)"
175 | echo "-----------------------------------------------------------"
176 |
--------------------------------------------------------------------------------
/odoo_dev.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # to run the script "sudo /bin/sh odoo_dev.sh"
3 | ################################################################################
4 | # Script for preparing Odoo developing platform on Ubuntu 14.04, 15.04 and 16.04 (could be used for other version too)
5 | # Author: Mahmoud Abdel Latif
6 | # Mobile No: +201002688172
7 | # Email: Mah008@me.com
8 | # Website: http://www.mah007.com
9 | #-------------------------------------------------------------------------------
10 | # This script will make ur computer ready for developing on ODOO from 8 to 11
11 | #-------------------------------------------------------------------------------
12 | # Make a new file:
13 | # sudo nano odoo_developing.sh
14 | # Place this content in it and then make the file executable:
15 | # sudo chmod +x odoo_developing.sh
16 | # git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
17 | # Execute the script to install Odoo:
18 | # ./odoo-developing
19 | ################################################################################
20 |
21 | ##fixed parameters
22 | #odoo instead of odoo use ur user name .EG OE_USER="mahmoud"
23 | OE_USER="odoo"
24 | #The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
25 | #Set to true if you want to install it, false if you don't need it or have it already installed.
26 | INSTALL_WKHTMLTOPDF="True"
27 |
28 | # Set this to True if you want to install Odoo 9 10 11 Enterprise! ( you can use enterprise normaly too ;) )
29 | IS_ENTERPRISE="True"
30 |
31 | ##
32 | ### WKHTMLTOPDF download links
33 | ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
34 | ## in order to have correct version of wkhtmltox installed, for a danger note refer to
35 | ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
36 | WKHTMLTOX_X64=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.xenial_amd64.deb
37 | WKHTMLTOX_X32=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.xenial_i386.deb
38 | #--------------------------------------------------
39 | # Update Server
40 | #--------------------------------------------------
41 | echo -e "\n---- Update Server ----"
42 | sudo apt-get update
43 | sudo apt-get upgrade -y
44 | sudo apt-get install default-jre -y
45 | sudo add-apt-repository ppa:webupd8team/java
46 | sudo apt-get install default-jdk -y
47 | sudo apt-get update
48 | sudo apt-get install oracle-java8-installer -y
49 | sudo add-apt-repository ppa:mystic-mirage/pycharm
50 | sudo apt-get update
51 |
52 | #--------------------------------------------------
53 | # Install PostgreSQL Server
54 | #--------------------------------------------------
55 | echo -e "\n---- Install PostgreSQL Server ----"
56 | sudo apt-get install postgresql postgresql-server-dev-* -y
57 |
58 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
59 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
60 |
61 | #--------------------------------------------------
62 | # Install Dependencies
63 | #--------------------------------------------------
64 | echo -e "\n---- Install tool packages ----"
65 | sudo apt-get install wget subversion git bzr bzrtools python-pip python3-pip gdebi-core pysassc -y
66 |
67 | echo -e "\n---- Install python packages ----"
68 | sudo apt-get install python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil python-gpgme python-launchpadlib build-essential python-all-dev python-setuptools python-imaging python-suds python-xlsxwriter python-wheel -y
69 |
70 | echo -e "\n---- Install python libraries ----"
71 | sudo pip install gdata psycogreen
72 | # This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04
73 | sudo -H pip install suds
74 |
75 | echo -e "\n--- Install other required packages"
76 | sudo apt-get install node-clean-css -y
77 | sudo apt-get install node-less -y
78 | sudo apt-get install python-gevent -y
79 |
80 | #--------------------------------------------------
81 | # Install Wkhtmltopdf if needed
82 | #--------------------------------------------------
83 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
84 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 9 ----"
85 | #pick up correct one from x64 & x32 versions:
86 | if [ "`getconf LONG_BIT`" == "64" ];then
87 | _url=$WKHTMLTOX_X64
88 | else
89 | _url=$WKHTMLTOX_X32
90 | fi
91 | sudo wget $_url
92 | sudo gdebi --n `basename $_url`
93 | sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
94 | sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
95 | else
96 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
97 | fi
98 |
99 |
100 |
101 |
102 | if [ $IS_ENTERPRISE = "True" ]; then
103 | # Odoo Enterprise install!
104 |
105 | echo -e "\n---- Installing Enterprise specific libraries ----"
106 | sudo apt-get install nodejs npm -y
107 | sudo npm install -g less
108 | sudo npm install -g less-plugin-clean-css
109 | sudo npm install -g rtlcss
110 | else
111 | echo -e "\n---- every thing is ready ----"
112 |
113 | fi
114 | sudo ln -s /usr/bin/nodejs /usr/bin/node
115 |
116 | sudo apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev python3-dev
117 | sudo easy_install greenlet
118 | sudo easy_install gevent
119 | sudo apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev python3-pip python3-wheel python3-setuptools
120 | sudo -H pip3 install phonenumbers
121 | sudo -H pip install -r https://raw.githubusercontent.com/odoo/odoo/10.0/requirements.txt
122 | sudo apt install -y python3-asn1crypto
123 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-vatnumber python3-werkzeug python3-xlsxwriter python3-yaml
124 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/11.0/requirements.txt
125 |
126 |
127 | echo "-----------------------------------------------------------"
128 | echo "Done! The Odoo developing platform is ready:"
129 |
130 | echo "you can now install pycharm community of professional"
131 |
132 | echo "using sudo apt-get install pycharm or pycharm-community"
133 |
134 | echo "Restart restart ur computer and start developing and have fun ;)"
135 | echo "-----------------------------------------------------------"
136 |
--------------------------------------------------------------------------------
/odoo_dev_2204.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # to run the script "sudo /bin/sh odoo15_2204.sh"
3 | # this script is for Ubuntu Descktop dev 22.04 Jammy
4 | ################################################################################
5 | # Script for preparing Odoo production server platform on Ubuntu 20.04 (could be used for other version too)
6 | # Author: Mahmoud Abdel Latif
7 | # Mobile No: +201002688172
8 | # Email: Mah008@me.com
9 | # Website: http://www.mah007.com
10 | #-------------------------------------------------------------------------------
11 | # This script will make ur server ready for installing ODOO from 8 to 14
12 | #-------------------------------------------------------------------------------
13 | # Make a new file:
14 | # sudo nano odoo_pro.sh
15 | # Place this content in it and then make the file executable:
16 | # sudo chmod +x odoo_pro.sh
17 | # git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
18 | # Execute the script to install Odoo:
19 | # ./odoo-developing
20 | ################################################################################
21 |
22 | ##fixed parameters
23 | #instead of odoo use ur user name .EG OE_USER="mahmoud"
24 | OE_USER="odoo" ## <----- your ubuntu User
25 | OE_BRANCH="16.0"
26 |
27 | #The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
28 | #Set to true if you want to install it, false if you don't need it or have it already installed.
29 | INSTALL_WKHTMLTOPDF="True"
30 |
31 | # Set this to True if you want to install Odoo 9 10 11 12 13 14Enterprise! ( you can use enterprise normaly too ;) )
32 | IS_ENTERPRISE="True"
33 |
34 | ##
35 | ### WKHTMLTOPDF download links
36 | ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
37 | ## in order to have correct version of wkhtmltox installed, for a danger note refer to
38 | ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
39 | WKHTMLTOX_X64=https://github.com/odoo/wkhtmltopdf/releases/download/nightly/odoo-wkhtmltopdf-ubuntu-jammy-x86_64-0.13.0-nightly.deb
40 | WKHTMLTOX_X32=https://github.com/odoo/wkhtmltopdf/releases/download/nightly/odoo-wkhtmltopdf-ubuntu-jammy-x86_64-0.13.0-nightly.deb
41 | #--------------------------------------------------
42 | # Update Server
43 | #--------------------------------------------------
44 | echo -e "\n---- Update Server ----"
45 | sudo apt-get update
46 | sudo apt-get upgrade -y
47 | apt install -y zip gdebi net-tools
48 | echo "----------------------------localization-------------------------------"
49 |
50 | export LC_ALL="en_US.UTF-8"
51 | export LC_CTYPE="en_US.UTF-8"
52 | sudo dpkg-reconfigure locales
53 |
54 | #--------------------------------------------------
55 | # Install PostgreSQL Server
56 | #--------------------------------------------------
57 | sudo sh -c 'echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
58 |
59 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
60 | sudo apt-get update
61 |
62 | echo -e "\n---- Install PostgreSQL Server ----"
63 | sudo apt-get install postgresql-15 postgresql-server-dev-15 -y
64 |
65 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
66 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
67 |
68 | #--------------------------------------------------
69 | # Install Dependencies
70 | #--------------------------------------------------
71 | echo -e "\n---- Install tool packages ----"
72 | sudo apt install -y git python3-pip build-essential wget python3-dev python3-venv python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libjpeg8-dev libopenjp2-7-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev
73 | echo -e "\n---- Install python libraries ----"
74 | sudo pip install gdata psycogreen
75 | # This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04 .... 20.04 ...22.04
76 | sudo -H pip install suds
77 |
78 | echo -e "\n--- Install other required packages"
79 | sudo apt-get install node-clean-css -y
80 | sudo apt-get install node-less -y
81 | sudo apt-get install python-gevent -y
82 | apt-get install libwww-perl -y
83 | #sudo apt install ifupdown -y
84 |
85 |
86 | #--------------------------------------------------
87 | # Install Wkhtmltopdf if needed
88 | #--------------------------------------------------
89 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
90 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 15.0 ----"
91 | #pick up correct one from x64 & x32 versions:
92 | if [ "`getconf LONG_BIT`" == "64" ];then
93 | _url=$WKHTMLTOX_X64
94 | else
95 | _url=$WKHTMLTOX_X32
96 | fi
97 | sudo wget $_url
98 | sudo gdebi --n `basename $_url`
99 | sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
100 | sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
101 | else
102 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
103 | fi
104 |
105 |
106 |
107 |
108 |
109 | # Odoo Enterprise install!
110 | sudo apt-get update
111 | sudo apt-get install -y ca-certificates curl gnupg
112 | sudo mkdir -p /etc/apt/keyrings
113 | curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
114 | NODE_MAJOR=20
115 | echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list
116 |
117 | sudo apt-get update
118 | sudo apt-get install nodejs -y
119 |
120 | echo -e "\n---- Installing Enterprise specific libraries ----"
121 |
122 | sudo npm install -g less
123 | sudo npm install -g less-plugin-clean-css
124 | sudo npm install -g rtlcss
125 |
126 | echo -e "\n---- every thing is ready ----"
127 |
128 |
129 | sudo ln -s /usr/bin/nodejs /usr/bin/node
130 |
131 | sudo apt-get install -y python3-dev
132 | sudo easy_install greenlet
133 | sudo easy_install gevent
134 | sudo apt-get install -y python3-pip python3-wheel python3-setuptools
135 | sudo -H pip3 install --upgrade pip
136 | sudo apt install -y python3-asn1crypto
137 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-werkzeug python3-xlsxwriter python3-yaml
138 | pip3 install -r https://raw.githubusercontent.com/odoo/odoo/$OE_BRANCH/requirements.txt --user
139 | # pip3 install -r https://raw.githubusercontent.com/mah007/OdooScript/14.0/requirements.txt --user
140 | pip3 install phonenumbers --user
141 | #
142 |
143 |
144 | echo "-----------------------------------------------------------"
145 | echo "Done! The Odoo Development platform is ready:"
146 |
147 | echo "Restart restart ur computer and start developing and have fun ;)"
148 | echo "-----------------------------------------------------------"
149 |
--------------------------------------------------------------------------------
/odoo_nginx.conf:
--------------------------------------------------------------------------------
1 | upstream odoo {
2 | server 127.0.0.1:8069 weight=1 fail_timeout=300s;
3 | }
4 | upstream odoo-im {
5 | server 127.0.0.1:8072 weight=1 fail_timeout=300s;
6 | }
7 |
8 |
9 | server {
10 | listen 80;
11 | return 301 https://$host$request_uri;
12 |
13 | }
14 |
15 | server {
16 | # server port and name
17 |
18 | server_name odoo-hr-test.lan;
19 |
20 | listen 80;
21 | listen 443 ssl;
22 | ssl_certificate /etc/ssl/certs/server.crt;
23 | ssl_certificate_key /etc/ssl/certs/server.key;
24 |
25 | # Specifies the maximum accepted body size of a client request,
26 | # as indicated by the request header Content-Length.
27 | client_max_body_size 200m;
28 | #log files
29 | access_log /var/log/nginx/odoo-access.log;
30 | error_log /var/log/nginx/odoo-error.log;
31 |
32 | proxy_connect_timeout 600;
33 | proxy_send_timeout 600;
34 | proxy_read_timeout 600;
35 | send_timeout 600;
36 | keepalive_timeout 600;
37 |
38 | gzip on;
39 | gzip_disable "msie6";
40 | gzip_vary on;
41 | gzip_proxied any;
42 | gzip_comp_level 6;
43 | gzip_buffers 16 8k;
44 | gzip_http_version 1.1;
45 | gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype image/bmp image/png image/gif image/jpeg image/jpg;
46 |
47 | # increase proxy buffer to handle some OpenERP web requests
48 | proxy_buffers 16 64k;
49 | proxy_buffer_size 128k;
50 | location / {
51 | proxy_pass http://odoo;
52 | # force timeouts if the backend dies
53 | proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
54 | # Add Headers for odoo proxy mode
55 | # set headers
56 | proxy_set_header X-Forwarded-Host $host;
57 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
58 | proxy_set_header X-Forwarded-Proto $scheme;
59 | proxy_set_header X-Real-IP $remote_addr;
60 | # by default, do not forward anything
61 | proxy_redirect off;
62 | }
63 | location /longpolling {
64 | proxy_pass http://odoo-im;
65 | proxy_set_header Host $host;
66 | proxy_set_header X-Real-IP $remote_addr;
67 | proxy_set_header X-Forwarded-For $http_host;
68 | }
69 | # cache some static data in memory for 60mins.
70 | # under heavy load this should relieve stress on the web interface a bit.
71 | location ~* /web/static/ {
72 | proxy_cache_valid 200 60m;
73 | proxy_buffering on;
74 | expires 864000;
75 | proxy_pass http://odoo;
76 | }
77 |
78 |
79 | }
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/odoo_pro.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # to run the script "sudo /bin/sh odoo_pro.sh"
3 | ################################################################################
4 | # Script for preparing Odoo production server platform on Ubuntu 14.04, 15.04 and 16.04 (could be used for other version too)
5 | # Author: Mahmoud Abdel Latif
6 | # Mobile No: +201002688172
7 | # Email: Mah008@me.com
8 | # Website: http://www.mah007.com
9 | #-------------------------------------------------------------------------------
10 | # This script will make ur server ready for installing ODOO from 8 to 11
11 | #-------------------------------------------------------------------------------
12 | # Make a new file:
13 | # sudo nano odoo_pro.sh
14 | # Place this content in it and then make the file executable:
15 | # sudo chmod +x odoo_pro.sh
16 | # git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
17 | # Execute the script to install Odoo:
18 | # ./odoo-developing
19 | ################################################################################
20 |
21 | ##fixed parameters
22 | #instead of odoo use ur user name .EG OE_USER="mahmoud"
23 | OE_USER="odoo"
24 | #The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
25 | #Set to true if you want to install it, false if you don't need it or have it already installed.
26 | INSTALL_WKHTMLTOPDF="True"
27 |
28 | # Set this to True if you want to install Odoo 9 10 11 Enterprise! ( you can use enterprise normaly too ;) )
29 | IS_ENTERPRISE="True"
30 |
31 | ##
32 | ### WKHTMLTOPDF download links
33 | ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
34 | ## in order to have correct version of wkhtmltox installed, for a danger note refer to
35 | ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
36 | WKHTMLTOX_X64=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.xenial_amd64.deb
37 | WKHTMLTOX_X32=https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.xenial_i386.deb
38 | #--------------------------------------------------
39 | # Update Server
40 | #--------------------------------------------------
41 | echo -e "\n---- Update Server ----"
42 | sudo apt-get update
43 | sudo apt-get upgrade -y
44 | apt install -y zip
45 |
46 | echo "----------------------------localization-------------------------------"
47 |
48 | export LC_ALL="en_US.UTF-8"
49 | export LC_CTYPE="en_US.UTF-8"
50 | sudo dpkg-reconfigure locales
51 | #--------------------------------------------------
52 | # Install PostgreSQL Server
53 | #--------------------------------------------------
54 |
55 |
56 | # Create the file repository configuration:
57 | sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
58 |
59 | # Import the repository signing key:
60 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
61 |
62 |
63 |
64 | echo -e "\n---- Install PostgreSQL Server ----"
65 | sudo apt-get install postgresql postgresql-server-dev-12 -y
66 |
67 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
68 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
69 |
70 | #--------------------------------------------------
71 | # Install Dependencies
72 | #--------------------------------------------------
73 | echo -e "\n---- Install tool packages ----"
74 | sudo apt-get install wget nano subversion git bzr bzrtools python-pip python3-pip gdebi-core -y pysassc
75 |
76 | echo -e "\n---- Install python packages ----"
77 | sudo apt-get install python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil python-gpgme python-launchpadlib build-essential python-all-dev python-setuptools python-imaging python-suds python-xlsxwriter python-wheel -y
78 |
79 | echo -e "\n---- Install python libraries ----"
80 | sudo pip install gdata psycogreen
81 | # This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04
82 | sudo -H pip install suds
83 |
84 | echo -e "\n--- Install other required packages"
85 | sudo apt-get install node-clean-css -y
86 | sudo apt-get install node-less -y
87 | sudo apt-get install python-gevent -y
88 | apt-get install libwww-perl
89 |
90 |
91 | #--------------------------------------------------
92 | # Install Wkhtmltopdf if needed
93 | #--------------------------------------------------
94 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
95 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 9 ----"
96 | #pick up correct one from x64 & x32 versions:
97 | if [ "`getconf LONG_BIT`" == "64" ];then
98 | _url=$WKHTMLTOX_X64
99 | else
100 | _url=$WKHTMLTOX_X32
101 | fi
102 | sudo wget $_url
103 | sudo gdebi --n `basename $_url`
104 | sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
105 | sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
106 | else
107 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
108 | fi
109 |
110 |
111 |
112 |
113 | if [ $IS_ENTERPRISE = "True" ]; then
114 | # Odoo Enterprise install!
115 |
116 | echo -e "\n---- Installing Enterprise specific libraries ----"
117 | sudo apt-get install nodejs npm -y
118 | sudo npm install -g less
119 | sudo npm install -g less-plugin-clean-css
120 | sudo npm install -g rtlcss
121 | else
122 | echo -e "\n---- every thing is ready ----"
123 |
124 | fi
125 | sudo ln -s /usr/bin/nodejs /usr/bin/node
126 |
127 | sudo apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev python3-dev
128 | sudo easy_install greenlet
129 | sudo easy_install gevent
130 | sudo apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev python3-pip python3-wheel python3-setuptools
131 | sudo -H pip install -r https://raw.githubusercontent.com/odoo/odoo/10.0/requirements.txt
132 | sudo apt install -y python3-asn1crypto
133 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-vatnumber python3-werkzeug python3-xlsxwriter python3-yaml
134 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/11.0/requirements.txt
135 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/12.0/requirements.txt
136 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/13.0/requirements.txt
137 |
138 |
139 | sudo -H pip3 install phonenumbers
140 |
141 | echo "---------------------------odoo directory--------------------------------"
142 | mkdir /odoo
143 | mkdir /etc/odoo
144 | mkdir /var/log/odoo
145 | touch /etc/odoo/odoo.conf
146 | touch /var/log/odoo/odoo-server.log
147 | chown odoo:odoo /var/log/odoo/odoo-server.log
148 | chown odoo:odoo /etc/odoo/odoo.conf
149 | chown -R odoo:odoo /odoo
150 | echo "-------------------------------odoo service----------------------------"
151 | wget https://raw.githubusercontent.com/mah007/OdooScript/12.0/odoo.service
152 | cp odoo.service /etc/systemd/system
153 | sudo systemctl daemon-reload
154 | sudo systemctl enable odoo
155 | sudo systemctl start odoo
156 | echo "----------------------------NGINX-------------------------------"
157 | wget https://raw.githubusercontent.com/mah007/OdooScript/12.0/nginx.sh
158 | bash nginx.sh
159 | apt-get install -y perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
160 |
161 | echo "-----------------------------------------------------------"
162 | echo "Done! The Odoo production platform is ready:"
163 |
164 | echo "Restart restart ur computer and start developing and have fun ;)"
165 | echo "-----------------------------------------------------------"
166 |
--------------------------------------------------------------------------------
/odoo_pro18.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # to run the script "sudo /bin/sh odoo_pro.sh"
3 | ################################################################################
4 | # Script for preparing Odoo production server platform on Ubuntu 14.04, 15.04 and 16.04 (could be used for other version too)
5 | # Author: Mahmoud Abdel Latif
6 | # Mobile No: +201002688172
7 | # Email: Mah008@me.com
8 | # Website: http://www.mah007.com
9 | #-------------------------------------------------------------------------------
10 | # This script will make ur server ready for installing ODOO from 8 to 14
11 | #-------------------------------------------------------------------------------
12 | # Make a new file:
13 | # sudo nano odoo_pro.sh
14 | # Place this content in it and then make the file executable:
15 | # sudo chmod +x odoo_pro.sh
16 | # git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
17 | # Execute the script to install Odoo:
18 | # ./odoo-developing
19 | ################################################################################
20 |
21 | ##fixed parameters
22 | #instead of odoo use ur user name .EG OE_USER="mahmoud"
23 | OE_USER="odoo"
24 | OE_BRANCH="14.0"
25 | #The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
26 | #Set to true if you want to install it, false if you don't need it or have it already installed.
27 | INSTALL_WKHTMLTOPDF="True"
28 |
29 | # Set this to True if you want to install Odoo 9 10 11 12 13 14Enterprise! ( you can use enterprise normaly too ;) )
30 | IS_ENTERPRISE="True"
31 |
32 | ##
33 | ### WKHTMLTOPDF download links
34 | ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
35 | ## in order to have correct version of wkhtmltox installed, for a danger note refer to
36 | ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
37 | WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
38 | WKHTMLTOX_X32=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_i386.deb
39 | #--------------------------------------------------
40 | # Update Server
41 | #--------------------------------------------------
42 | echo -e "\n---- Update Server ----"
43 | sudo apt-get update
44 | sudo apt-get upgrade -y
45 | apt install -y zip
46 | echo "----------------------------localization-------------------------------"
47 |
48 | export LC_ALL="en_US.UTF-8"
49 | export LC_CTYPE="en_US.UTF-8"
50 | sudo dpkg-reconfigure locales
51 |
52 | #--------------------------------------------------
53 | # Install PostgreSQL Server
54 | #--------------------------------------------------
55 | wget https://raw.githubusercontent.com/mah007/OdooScript/12.0/pgdg.list
56 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/webmin.list
57 | cp pgdg.list /etc/apt/sources.list.d
58 | cp webmin.list /etc/apt/sources.list.d
59 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
60 | sudo apt-get update
61 |
62 | echo -e "\n---- Install PostgreSQL Server ----"
63 | sudo apt-get install postgresql-13 postgresql-server-dev-13 -y
64 |
65 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
66 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
67 |
68 | #--------------------------------------------------
69 | # Install Dependencies
70 | #--------------------------------------------------
71 | echo -e "\n---- Install tool packages ----"
72 | sudo apt-get install wget nano subversion git bzr bzrtools python-pip python3-pip gdebi-core -y pysassc
73 |
74 | echo -e "\n---- Install python packages ----"
75 | sudo apt-get install python-dateutil python-feedparser python-ldap python-libxslt1 python-lxml python-mako python-openid python-psycopg2 python-pybabel python-pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi python-docutils python-psutil python-mock python-unittest2 python-jinja2 python-pypdf python-decorator python-requests python-passlib python-pil python-gpgme python-launchpadlib build-essential python-all-dev python-setuptools python-imaging python-suds python-xlsxwriter python-wheel -y
76 |
77 | echo -e "\n---- Install python libraries ----"
78 | sudo pip install gdata psycogreen
79 | # This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04
80 | sudo -H pip install suds
81 |
82 | echo -e "\n--- Install other required packages"
83 | sudo apt-get install node-clean-css -y
84 | sudo apt-get install node-less -y
85 | sudo apt-get install python-gevent -y
86 | apt-get install libwww-perl -y
87 | #sudo apt install ifupdown -y
88 |
89 |
90 | #--------------------------------------------------
91 | # Install Wkhtmltopdf if needed
92 | #--------------------------------------------------
93 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
94 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 9 ----"
95 | #pick up correct one from x64 & x32 versions:
96 | if [ "`getconf LONG_BIT`" == "64" ];then
97 | _url=$WKHTMLTOX_X64
98 | else
99 | _url=$WKHTMLTOX_X32
100 | fi
101 | sudo wget $_url
102 | sudo gdebi --n `basename $_url`
103 | sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
104 | sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
105 | else
106 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
107 | fi
108 |
109 |
110 |
111 |
112 | if [ $IS_ENTERPRISE = "True" ]; then
113 | # Odoo Enterprise install!
114 |
115 | echo -e "\n---- Installing Enterprise specific libraries ----"
116 | sudo apt-get install nodejs npm -y
117 | sudo npm install -g less
118 | sudo npm install -g less-plugin-clean-css
119 | sudo npm install -g rtlcss
120 | else
121 | echo -e "\n---- every thing is ready ----"
122 |
123 | fi
124 | sudo ln -s /usr/bin/nodejs /usr/bin/node
125 |
126 | sudo apt-get install -y libsasl2-dev python-dev libldap2-dev libssl-dev python3-dev
127 | sudo easy_install greenlet
128 | sudo easy_install gevent
129 | sudo apt-get install -y libxml2-dev libxslt1-dev zlib1g-dev python3-pip python3-wheel python3-setuptools
130 | sudo -H pip install -r https://raw.githubusercontent.com/odoo/odoo/10.0/requirements.txt
131 | sudo apt install -y python3-asn1crypto
132 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-vatnumber python3-werkzeug python3-xlsxwriter python3-yaml
133 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/11.0/requirements.txt
134 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/12.0/requirements.txt
135 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/13.0/requirements.txt
136 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/14.0/requirements.txt
137 | sudo -H pip3 install -r https://raw.githubusercontent.com/mah007/OdooScript/14.0/requirements.txt
138 | sudo -H pip3 install phonenumbers
139 | echo "---------------------------odoo directory--------------------------------"
140 | mkdir /odoo
141 | mkdir /etc/odoo
142 | mkdir /var/log/odoo
143 | touch /etc/odoo/odoo.conf
144 | touch /var/log/odoo/odoo-server.log
145 | chown odoo:odoo /var/log/odoo/odoo-server.log
146 | chown odoo:odoo /etc/odoo/odoo.conf
147 | cd /odoo
148 |
149 | sudo git clone --depth 1 --branch $OE_BRANCH https://www.github.com/odoo/odoo
150 | cd /
151 |
152 | chown -R odoo:odoo /odoo
153 |
154 | cd /root
155 | echo "-------------------------------odoo service----------------------------"
156 | wget https://raw.githubusercontent.com/mah007/OdooScript/12.0/odoo.service
157 | cp odoo.service /etc/systemd/system
158 | sudo systemctl daemon-reload
159 | sudo systemctl enable odoo
160 | sudo systemctl start odoo
161 | echo "----------------------------NGINX-------------------------------"
162 | wget https://raw.githubusercontent.com/mah007/OdooScript/12.0/nginx.sh
163 | bash nginx.sh
164 | echo "---------------------------webmin--------------------------------"
165 | apt-get install -y perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
166 | wget https://download.webmin.com/jcameron-key.asc
167 | apt-key add jcameron-key.asc
168 | apt-get install apt-transport-https -y
169 | apt-get update
170 | apt-get install webmin -y
171 |
172 |
173 | echo "-----------------------------------------------------------"
174 | echo "Done! The Odoo production platform is ready:"
175 |
176 | echo "Restart restart ur computer and start developing and have fun ;)"
177 | echo "-----------------------------------------------------------"
178 |
--------------------------------------------------------------------------------
/odoo_pro20.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # to run the script "sudo /bin/sh odoo_pro.sh"
3 | ################################################################################
4 | # Script for preparing Odoo production server platform on Ubuntu 20.04 (could be used for other version too)
5 | # Author: Mahmoud Abdel Latif
6 | # Mobile No: +201002688172
7 | # Email: Mah008@me.com
8 | # Website: http://www.mah007.com
9 | #-------------------------------------------------------------------------------
10 | # This script will make ur server ready for installing ODOO from 8 to 14
11 | #-------------------------------------------------------------------------------
12 | # Make a new file:
13 | # sudo nano odoo_pro.sh
14 | # Place this content in it and then make the file executable:
15 | # sudo chmod +x odoo_pro.sh
16 | # git clone --depth 1 --branch 10.0 https://www.gitlab.com/mah007/odoo .
17 | # Execute the script to install Odoo:
18 | # ./odoo-developing
19 | ################################################################################
20 |
21 | ##fixed parameters
22 | #instead of odoo use ur user name .EG OE_USER="mahmoud"
23 | OE_USER="odoo"
24 | OE_BRANCH="14.0"
25 | #The default port where this Odoo instance will run under (provided you use the command -c in the terminal)
26 | #Set to true if you want to install it, false if you don't need it or have it already installed.
27 | INSTALL_WKHTMLTOPDF="True"
28 |
29 | # Set this to True if you want to install Odoo 9 10 11 12 13 14Enterprise! ( you can use enterprise normaly too ;) )
30 | IS_ENTERPRISE="True"
31 |
32 | ##
33 | ### WKHTMLTOPDF download links
34 | ## === Ubuntu Trusty x64 & x32 === (for other distributions please replace these two links,
35 | ## in order to have correct version of wkhtmltox installed, for a danger note refer to
36 | ## https://www.odoo.com/documentation/8.0/setup/install.html#deb ):
37 | WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
38 | WKHTMLTOX_X32=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_i386.deb
39 | #--------------------------------------------------
40 | # Update Server
41 | #--------------------------------------------------
42 | echo -e "\n---- Update Server ----"
43 | sudo apt-get update
44 | sudo apt-get upgrade -y
45 | apt install -y zip gdebi
46 | echo "----------------------------localization-------------------------------"
47 |
48 | export LC_ALL="en_US.UTF-8"
49 | export LC_CTYPE="en_US.UTF-8"
50 | sudo dpkg-reconfigure locales
51 |
52 | #--------------------------------------------------
53 | # Install PostgreSQL Server
54 | #--------------------------------------------------
55 | sudo sh -c 'echo "deb [arch=amd64] http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
56 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/webmin.list
57 | cp webmin.list /etc/apt/sources.list.d
58 | wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
59 | sudo apt-get update
60 |
61 | echo -e "\n---- Install PostgreSQL Server ----"
62 | sudo apt-get install postgresql-13 postgresql-server-dev-13 -y
63 |
64 | echo -e "\n---- Creating the ODOO PostgreSQL User ----"
65 | sudo su - postgres -c "createuser -s $OE_USER" 2> /dev/null || true
66 |
67 | #--------------------------------------------------
68 | # Install Dependencies
69 | #--------------------------------------------------
70 | echo -e "\n---- Install tool packages ----"
71 | sudo apt install -y git python3-pip build-essential wget python3-dev python3-venv python3-wheel libfreetype6-dev libxml2-dev libzip-dev libldap2-dev libsasl2-dev python3-setuptools node-less libjpeg-dev zlib1g-dev libpq-dev libxslt1-dev libldap2-dev libtiff5-dev libjpeg8-dev libopenjp2-7-dev liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev
72 | echo -e "\n---- Install python libraries ----"
73 | sudo pip install gdata psycogreen
74 | # This is for compatibility with Ubuntu 16.04. Will work on 14.04, 15.04 and 16.04 .... 20.04
75 | sudo -H pip install suds
76 |
77 | echo -e "\n--- Install other required packages"
78 | sudo apt-get install node-clean-css -y
79 | sudo apt-get install node-less -y
80 | sudo apt-get install python-gevent -y
81 | apt-get install libwww-perl -y
82 | #sudo apt install ifupdown -y
83 |
84 |
85 | #--------------------------------------------------
86 | # Install Wkhtmltopdf if needed
87 | #--------------------------------------------------
88 | if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
89 | echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 9 ----"
90 | #pick up correct one from x64 & x32 versions:
91 | if [ "`getconf LONG_BIT`" == "64" ];then
92 | _url=$WKHTMLTOX_X64
93 | else
94 | _url=$WKHTMLTOX_X32
95 | fi
96 | sudo wget $_url
97 | sudo gdebi --n `basename $_url`
98 | sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
99 | sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
100 | else
101 | echo "Wkhtmltopdf isn't installed due to the choice of the user!"
102 | fi
103 |
104 |
105 |
106 |
107 | if [ $IS_ENTERPRISE = "True" ]; then
108 | # Odoo Enterprise install!
109 |
110 | echo -e "\n---- Installing Enterprise specific libraries ----"
111 | sudo apt-get install nodejs npm -y
112 | sudo npm install -g less
113 | sudo npm install -g less-plugin-clean-css
114 | sudo npm install -g rtlcss
115 | else
116 | echo -e "\n---- every thing is ready ----"
117 |
118 | fi
119 | sudo ln -s /usr/bin/nodejs /usr/bin/node
120 |
121 | sudo apt-get install -y python3-dev
122 | sudo easy_install greenlet
123 | sudo easy_install gevent
124 | sudo apt-get install -y python3-pip python3-wheel python3-setuptools
125 | sudo -H pip3 install --upgrade pip
126 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/14.0/requirements.txt
127 | sudo apt install -y python3-asn1crypto
128 | sudo apt install -y python3-babel python3-bs4 python3-cffi-backend python3-cryptography python3-dateutil python3-docutils python3-feedparser python3-funcsigs python3-gevent python3-greenlet python3-html2text python3-html5lib python3-jinja2 python3-lxml python3-mako python3-markupsafe python3-mock python3-ofxparse python3-openssl python3-passlib python3-pbr python3-pil python3-psutil python3-psycopg2 python3-pydot python3-pygments python3-pyparsing python3-pypdf2 python3-renderpm python3-reportlab python3-reportlab-accel python3-roman python3-serial python3-stdnum python3-suds python3-tz python3-usb python3-vatnumber python3-werkzeug python3-xlsxwriter python3-yaml
129 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/11.0/requirements.txt
130 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/12.0/requirements.txt
131 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/13.0/requirements.txt
132 | sudo -H pip3 install -r https://raw.githubusercontent.com/odoo/odoo/14.0/requirements.txt
133 | sudo -H pip3 install -r https://raw.githubusercontent.com/mah007/OdooScript/14.0/requirements.txt
134 | sudo -H pip3 install phonenumbers
135 | echo "---------------------------odoo directory--------------------------------"
136 | mkdir /odoo
137 | mkdir /etc/odoo
138 | mkdir /var/log/odoo
139 | touch /etc/odoo/odoo.conf
140 | touch /var/log/odoo/odoo-server.log
141 | chown odoo:odoo /var/log/odoo/odoo-server.log
142 | chown odoo:odoo /etc/odoo/odoo.conf
143 | cd /odoo
144 |
145 | sudo git clone --depth 1 --branch $OE_BRANCH https://www.github.com/odoo/odoo
146 | cd /
147 |
148 | chown -R odoo:odoo /odoo
149 |
150 | cd /root
151 | echo "-------------------------------odoo service----------------------------"
152 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/odoo.service
153 | cp odoo.service /etc/systemd/system
154 | sudo systemctl daemon-reload
155 | sudo systemctl enable odoo
156 | sudo systemctl start odoo
157 | echo "----------------------------NGINX-------------------------------"
158 | wget https://raw.githubusercontent.com/mah007/OdooScript/14.0/nginx.sh
159 | bash nginx.sh
160 | echo "---------------------------webmin--------------------------------"
161 | apt-get install -y perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl apt-show-versions python
162 | wget https://download.webmin.com/jcameron-key.asc
163 | apt-key add jcameron-key.asc
164 | apt-get install apt-transport-https -y
165 | apt-get update
166 | apt-get install webmin -y
167 |
168 |
169 | echo "-----------------------------------------------------------"
170 | echo "Done! The Odoo production platform is ready:"
171 |
172 | echo "Restart restart ur computer and start developing and have fun ;)"
173 | echo "-----------------------------------------------------------"
174 |
--------------------------------------------------------------------------------
/odoo_redhat.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e # Exit on any error
3 |
4 | # Function to display colorful intro
5 | function intro() {
6 | clear
7 | echo -e "\e[1;32m#############################################\e[0m" # Green
8 | echo -e "\e[1;31m# #\e[0m" # Red
9 | echo -e "\e[1;34m# WELCOME TO ODOO INSTALLING SCRIPT FOR #\e[0m" # Blue
10 | echo -e "\e[1;34m# REDHAT 9 & ALMALINUX 9 #\e[0m" # Blue
11 | echo -e "\e[1;31m# #\e[0m" # Red
12 | echo -e "\e[1;32m#############################################\e[0m" # Green
13 | echo ""
14 | echo -e "\e[1;33mStarting the installation...\e[0m" # Yellow
15 | sleep 3 # Pause for 3 seconds
16 | }
17 |
18 | # Call the intro function
19 | intro
20 |
21 | # Ask for Odoo version before doing anything
22 | echo "Choose Odoo version (14.0, 15.0, 16.0, 17.0, 18.0):"
23 | read odoo_version
24 |
25 | # Get the hostname of the machine
26 | hostname=$(hostname)
27 |
28 | # Enable Code Ready Repository and Development Tools
29 | sudo subscription-manager repos --enable codeready-builder-for-rhel-9-x86_64-rpms 2>/dev/null || true
30 | sudo yum groupinstall -y "Development Tools" 2>/dev/null || true
31 | sudo yum install -y git gcc redhat-rpm-config libxslt-devel bzip2-devel openldap-devel libjpeg-devel freetype-devel curl unzip openssl-devel wget yum-utils make libffi-devel zlib-devel tar libpq-devel python3.11 python3.11-devel python3.11-pip 2>/dev/null || true
32 |
33 | # Set Python 3.11 as the default python3 alternative
34 | sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1 2>/dev/null || true
35 | sudo update-alternatives --config python 2>/dev/null || true
36 |
37 | # Set pip3.11 as the default pip3 and pip alternative
38 | sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3.11 1 2>/dev/null || true
39 | sudo update-alternatives --config pip 2>/dev/null || true
40 |
41 | # Install PostgreSQL from official repository
42 | sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm 2>/dev/null || true
43 | sudo yum install -y postgresql16-server postgresql16 postgresql16-devel 2>/dev/null || true
44 |
45 | # Check if the data directory is empty before initializing PostgreSQL
46 | if [ ! "$(ls -A /var/lib/pgsql/16/data/)" ]; then
47 | sudo /usr/pgsql-16/bin/postgresql-16-setup initdb
48 | else
49 | echo "Data directory is not empty, skipping initdb."
50 | fi
51 |
52 | sudo systemctl enable --now postgresql-16 2>/dev/null || true
53 |
54 | # Create a PostgreSQL user for Odoo
55 | su - postgres -c "createuser -s odoo" 2>/dev/null || true
56 |
57 | # Install wkhtmltox
58 | sudo yum install -y https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox-0.12.6.1-2.almalinux9.x86_64.rpm 2>/dev/null || true
59 |
60 | # Install Node.js
61 | sudo yum module install -y nodejs:18 2>/dev/null || true
62 |
63 | # Create Odoo user and directories
64 | sudo useradd -m -U -r -d /home/odoo -s /bin/bash odoo 2>/dev/null || true
65 | sudo mkdir -p /odoo /odoo/extra 2>/dev/null || true
66 | sudo chown -R odoo:odoo /odoo
67 |
68 | # Clone Odoo from GitHub
69 | sudo -u odoo git clone --depth 1 --branch $odoo_version https://www.github.com/odoo/odoo.git /odoo/odoo 2>/dev/null || true
70 |
71 | # Set the PostgreSQL binary path for the Odoo user
72 | sudo -u odoo bash -c "echo 'export PATH=/usr/pgsql-16/bin:\$PATH' >> /home/odoo/.bashrc" 2>/dev/null || true
73 | sudo -u odoo bash -c "source /home/odoo/.bashrc"
74 |
75 | # Install Python requirements for Odoo under the Odoo user
76 | sudo -u odoo -H bash -c "pip install -r https://raw.githubusercontent.com/odoo/odoo/$odoo_version/requirements.txt --user" 2>/dev/null || true
77 |
78 | # Create Odoo configuration directory and log file
79 | sudo mkdir -p /etc/odoo /var/log/odoo 2>/dev/null || true
80 | sudo touch /etc/odoo/odoo.conf /var/log/odoo/odoo-server.log
81 | sudo chown -R odoo:odoo /etc/odoo /var/log/odoo
82 |
83 | # Create Odoo configuration file
84 | cat </dev/null || true
116 |
117 | # Install the latest version of Nginx from official repository
118 | sudo yum install -y nginx 2>/dev/null || true
119 | sudo systemctl enable --now nginx 2>/dev/null || true
120 |
121 | # Generate a self-signed SSL certificate
122 | sudo mkdir -p /etc/ssl/nginx 2>/dev/null || true
123 | sudo openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 \
124 | -subj "/C=US/ST=State/L=City/O=Company Name/OU=Org/CN=$hostname" \
125 | -keyout /etc/ssl/nginx/server.key -out /etc/ssl/nginx/server.crt 2>/dev/null || true
126 |
127 | # Set permissions for the certificate files
128 | sudo chmod 600 /etc/ssl/nginx/server.key /etc/ssl/nginx/server.crt
129 |
130 | # Create the Nginx configuration for Odoo
131 | cat <